跳过内容

iOS设置

GitHub

内容素量跟踪会自动启动一旦插件安装完成,但iOS内应用功能,如SDK日志、截屏捕获和回放配置仍需要上游URL处理设置。

1. 添加URL方案

标题:1. 添加URL方案

添加 cs-$(PRODUCT_BUNDLE_IDENTIFIER) 到您的应用程序URL方案中(Xcode或主机应用) Info.plist.

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
标题:2. 将 Contentsquare deeplinks 转发

Wherever your Capacitor host app handles incoming URLs, forward them to the native SDK:

import ContentsquareModule
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
Contentsquare.handle(url: url)
return true
}
import ContentsquareModule
func scene(_ scene: UIScene, openURLContexts urlContexts: Set<UIOpenURLContext>) {
if let url = urlContexts.first?.url {
Contentsquare.handle(url: url)
}
}
import ContentsquareModule
.onOpenURL { url in
Contentsquare.handle(url: url)
}
  • 在设备或模拟器上启动应用。
  • 在 Xcode 或 Console 日志中使用过滤器 CSLIB.
  • 打开 Contentsquare 移动工具并触发应用内功能以确认 deeplink 被处理。

继续从 iOS 设置

标题:继续从 iOS 设置

如果您正在使用 iOS 设置 来规划原生插件工作,连接它与 使用 @capgo/capacitor-contentsquare 为native能力在使用@capgo/capacitor-contentsquare中 Capgo插件目录 为产品工作流程在Capgo插件目录中 Capacitor由Capgo插件 为实现细节在Capacitor由Capgo插件中 添加或更新插件 为实现细节在添加或更新插件中, Ionic企业插件替代品 为产品工作流程在Ionic企业插件替代品中