🔹 通知
复制包含安装步骤和该插件完整 Markdown 指南的配置 prompt。
🔔 在您的 Capacitor 应用中配置 Capgo 原生通知。
⚙️ 配置
标题为 “ ⚙️ Setup” 的章节npx @capgo/cli@latest notifications setup安装 Capgo notifications 插件,添加 Capacitor 配置,创建 helper 文件,并运行 Capacitor sync。 在发送生产环境通知前,请先在 Capgo App 的 Notifications 标签页中配置 Android 和 iOS 的推送凭据。
示例:
npx @capgo/cli@latest notifications setup com.example.app选项:
| 参数 | 类型 | 描述 |
|---|---|---|
| —server-url | string | Capgo API 服务器 URL |
| —file | string | 要创建的 helper 文件 (默认: src/capgo-notifications.ts) |
| —force | boolean | 如果辅助文件已存在,则进行覆盖 |
| —no-install | boolean | 跳过安装 notifications package |
| —no-sync | boolean | 跳过 Capacitor 同步 |