AI 辅助集成
使用 AI 编码助手在您的项目中集成和配置 Pushwoosh React Native 插件。通过将您的助手连接到 Context7 MCP 服务器,它可以访问最新的插件文档、代码示例和 API 参考——从而生成准确、可用的集成代码。
工作原理
Anchor link toContext7 是一个 MCP 服务器,为 AI 助手提供最新的库文档。当您的助手可以访问 Context7 时,它可以在对话期间直接获取最新的 Pushwoosh React Native 插件文档、代码片段和 API 参考——而不是依赖可能过时的训练数据。
Context7 上的 Pushwoosh React Native 插件库 ID 为:/pushwoosh/pushwoosh-react-native-plugin
设置 Context7
Anchor link to将 Context7 添加到您的 AI 助手的 MCP 配置中:
运行以下命令:
claude mcp add context7 -- npx -y @anthropic-ai/context7-mcp@latest添加到您的 MCP 配置文件(.cursor/mcp.json 或等效文件):
{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } }}示例提示
Anchor link to配置好 Context7 后,您可以使用自然语言提示来集成插件。以下是用于常见任务的即用型提示。
基本插件集成
Anchor link toIntegrate 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.推送通知处理
Anchor link toShow me how to handle push notification callbacks (receive, open) withPushwoosh React Native plugin. I want to process push payload data andnavigate to specific screens based on custom data.
Use Context7 MCP to fetch Pushwoosh React Native plugin documentation for push event handling.使用标签进行用户分群
Anchor link toShow 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.AI 助手获取的内容
Anchor link to当您的助手向 Context7 查询 Pushwoosh React Native 插件时,它会收到:
- 安装说明 — npm/yarn 设置和平台特定配置
- API 参考 — 公共方法、事件监听器和回调签名
- 代码示例 — 适用于常见用例的 JavaScript 和 TypeScript 代码片段
- 事件文档 — pushReceived、pushOpened 和深层链接事件处理程序
- 配置详情 — 初始化参数、iOS 和 Android 设置步骤