指南
Contentsquare的教程
使用@capgo/capacitor-contentsquare
Capacitor内部本地桥接协议实现
安装
bun add @capgo/capacitor-contentsquare
bunx cap sync
此插件暴露的内容
optInoptOutsendScreenNamesendTransaction
示例使用
optIn
查看当前协议的上游定义
import { Contentsquare } from '@capgo/capacitor-contentsquare';
await Contentsquare.optIn();
optOut
查看当前协议的上游定义
import { Contentsquare } from '@capgo/capacitor-contentsquare';
await Contentsquare.optOut();
sendScreenName
查看当前协议的上游定义
import { Contentsquare } from '@capgo/capacitor-contentsquare';
await Contentsquare.sendScreenName({} as { name: string });
sendTransaction
查看上游定义以获取当前合同的定义。
import { Contentsquare } from '@capgo/capacitor-contentsquare';
await Contentsquare.sendTransaction({} as TransactionItem);
全局参考
- GitHub: https://github.com/Cap-go/capacitor-contentsquare/
- 文档:/docs/plugins/contentsquare/