# KI-gestützte Integration

Verwenden Sie KI-Coding-Assistenten, um das Pushwoosh React Native Plugin in Ihrem Projekt zu integrieren und zu konfigurieren. Indem Sie Ihren Assistenten mit dem [Context7](https://context7.com/) MCP-Server verbinden, erhält er Zugriff auf aktuelle Plugin-Dokumentationen, Code-Beispiele und API-Referenzen – so kann er präzisen, funktionierenden Integrationscode generieren.

<Aside type="note">
Ihr KI-Assistent muss [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) unterstützen, um Context7 zu verwenden. Zu den unterstützten Tools gehören **Claude Code**, **Cursor**, **Windsurf**, **Cline** und andere.
</Aside>

## So funktioniert es

Context7 ist ein MCP-Server, der KI-Assistenten mit aktueller Bibliotheksdokumentation versorgt. Wenn Ihr Assistent Zugriff auf Context7 hat, kann er die neuesten Dokumente, Code-Schnipsel und API-Referenzen des Pushwoosh React Native Plugins direkt während des Gesprächs abrufen – anstatt sich auf potenziell veraltete Trainingsdaten zu verlassen.

Die Bibliotheks-ID des Pushwoosh React Native Plugins auf Context7 lautet: **`/pushwoosh/pushwoosh-react-native-plugin`**

## Context7 einrichten

Fügen Sie [Context7](https://github.com/upstash/context7#installation) zur MCP-Konfiguration Ihres KI-Assistenten hinzu:

<Tabs>
  <TabItem label="Claude Code">
Führen Sie den folgenden Befehl aus:

```bash
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
  </TabItem>
  <TabItem label="Cursor / Windsurf">
Fügen Sie dies zu Ihrer MCP-Konfigurationsdatei (`.cursor/mcp.json` oder einer entsprechenden Datei) hinzu:

```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}
```
  </TabItem>
</Tabs>

## Beispiel-Prompts

Sobald Context7 konfiguriert ist, können Sie das Plugin mit Prompts in natürlicher Sprache integrieren. Nachfolgend finden Sie fertige Prompts für gängige Aufgaben.

### Grundlegende Plugin-Integration

```text
Integrate Pushwoosh React Native plugin into my React Native project.

Requirements:
- Install pushwoosh-react-native-plugin via npm
- Initialize Pushwoosh with my App ID in App component
- Register for push notifications and handle pushReceived and pushOpened events

Use Context7 MCP to fetch Pushwoosh React Native plugin documentation.
```

### Handhabung von Push-Benachrichtigungen

```text
Show me how to handle push notification callbacks (receive, open) with
Pushwoosh React Native plugin. I want to process push payload data and
navigate to specific screens based on custom data.

Use Context7 MCP to fetch Pushwoosh React Native plugin documentation for push event handling.
```

### Benutzersegmentierung mit Tags

```text
Show me how to use Pushwoosh tags for user segmentation in a React Native app.
I need to set tags, get tags, and set user ID for cross-device tracking.

Use Context7 MCP to fetch Pushwoosh React Native plugin documentation for setTags and getTags.
```

<Aside type="tip">
Wenn Sie **"Use Context7 MCP to fetch Pushwoosh React Native plugin documentation"** am Ende Ihres Prompts hinzufügen, weisen Sie den KI-Assistenten an, die neuesten Plugin-Dokumente abzurufen, bevor er Code generiert.
</Aside>

## Was der KI-Assistent erhält

Wenn Ihr Assistent Context7 für das Pushwoosh React Native Plugin abfragt, erhält er:

- **Installationsanweisungen** – npm/yarn-Setup und plattformspezifische Konfiguration
- **API-Referenz** – öffentliche Methoden, Event-Listener und Callback-Signaturen
- **Code-Beispiele** – JavaScript- und TypeScript-Schnipsel für gängige Anwendungsfälle
- **Event-Dokumentation** – `pushReceived`, `pushOpened` und Deep-Link-Event-Handler
- **Konfigurationsdetails** – Initialisierungsparameter, iOS- und Android-Einrichtungsschritte