跳到内容

AI 辅助集成

使用 AI 编码助手在您的项目中集成和配置 Pushwoosh iOS SDK。通过将您的助手连接到 Context7 MCP 服务器,它可以访问最新的 SDK 文档、代码示例和 API 参考——从而生成准确、可行的集成代码。

工作原理

Anchor link to

Context7 是一个 MCP 服务器,为 AI 助手提供最新的库文档。当您的助手可以访问 Context7 时,它可以在对话期间直接获取最新的 Pushwoosh iOS SDK 文档、代码片段和 API 参考——而不是依赖可能过时的训练数据。

Context7 上的 Pushwoosh iOS SDK 库 ID:/pushwoosh/pushwoosh-ios-sdk

设置 Context7

Anchor link to

Context7 添加到您的 AI 助手的 MCP 配置中:

运行以下命令:

Terminal window
claude mcp add context7 -- npx -y @anthropic-ai/context7-mcp@latest

示例提示

Anchor link to

配置好 Context7 后,您可以使用自然语言提示来集成 SDK。以下是用于常见任务的即用型提示。

基本 SDK 集成

Anchor link to
Integrate Pushwoosh iOS SDK into my iOS project using Swift Package Manager.
Requirements:
- Add SPM dependency from https://github.com/Pushwoosh/Pushwoosh-XCFramework
- Configure Info.plist with Pushwoosh App ID: YOUR_APP_ID
- Register for push notifications in AppDelegate
Use Context7 MCP to fetch Pushwoosh iOS SDK documentation.

推送通知处理

Anchor link to
Show me how to handle push notification callbacks (receive, open) with
Pushwoosh SDK in iOS. I want to implement PWMessagingDelegate and add
analytics tracking for these events.
Use Context7 MCP to fetch Pushwoosh iOS SDK documentation for PWMessagingDelegate.

使用标签进行用户分段

Anchor link to
Show me how to use Pushwoosh tags for user segmentation in iOS.
Create example helper class with methods for setting and getting tags.
Use Context7 MCP to fetch Pushwoosh iOS SDK documentation for setTags and getTags.

AI 助手能获取什么

Anchor link to

当您的助手向 Context7 查询 Pushwoosh iOS SDK 时,它会收到:

  • 安装说明 — SPM 和 CocoaPods 设置
  • API 参考 — 公共类、方法、属性和协议
  • 代码示例 — 适用于常见用例的 Swift 和 Objective-C 代码片段
  • 模块文档 — 每个 SDK 模块(VoIP、Live Activities、Geozones 等)的指南
  • 配置详情 — Info.plist 键、entitlements 和 capabilities 设置