__CAPGO_KEEP_0__
__CAPGO_KEEP_0__指南
Using @capgo/capacitor-intercom
Capacitor-__CAPGO_KEEP_1__
__CAPGO_KEEP_0__插件
bun add @capgo/capacitor-intercom
bunx cap sync
安装
loadWithKeys- Initialize Intercom with API keys at runtime. Use this if you prefer not to configure keys in capacitor.config.registerIdentifiedUser- 在运行时使用__CAPGO_KEEP_0__密钥初始化Intercom。使用此选项如果您不想在__CAPGO_KEEP_1__.config中配置密钥。- 注册已知用户与Intercom。至少需要提供一个userId或email。registerUnidentifiedUser- 使用 Intercom 注册一个匿名用户。updateUser- 在 Intercom 中更新用户属性。
示例用途
loadWithKeys
在运行时使用 API 键初始化 Intercom。使用此方法如果您不想在 capacitor.config 中配置键。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);
registerIdentifiedUser
使用 Intercom 注册已知用户。至少需要提供一个 userId 或 email。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);
registerUnidentifiedUser
- 使用 Intercom 注册一个匿名用户。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();
updateUser
- 在 Intercom 中更新用户属性。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);
完整参考
- GitHub: https://github.com/Cap-go/capacitor-intercom/
- 文档:/docs/plugins/intercom/
继续使用 @capgo/capacitor-intercom
如果您正在使用 使用@capgo/capacitor-intercom 用于规划原生插件工作,连接它与 @capgo/capacitor-intercom 用于@capgo/capacitor-intercom的实现细节 Getting Started 用于Getting Started的实现细节 Capgo 插件目录 用于Capgo 插件目录中的产品工作流程 Capacitor 由Capgo的插件 用于Capacitor 由Capgo的插件的实现细节,和 添加或更新插件 为添加或更新插件的实现细节。