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