跳过内容

iOS 设置

内容广告跟踪一旦安装插件,但 iOS 应用内功能,如 SDK 日志、截图捕获和回放配置仍需要上游 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 转发

无论您的 Capacitor 主机应用程序如何处理 incoming URLs,均将它们转发到本机 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 处理