iOS 配置
复制一个包含安装步骤和此插件的完整 Markdown 指南的配置提示。
内容广场跟踪在安装插件后自动启动,但iOS内应用功能,如SDK日志、截屏捕获和回放配置仍需要上游URL处理设置。
1. 添加URL方案
1. 添加URL方案添加 cs-$(PRODUCT_BUNDLE_IDENTIFIER) 复制到剪贴板 Info.plist.
<key>CFBundleURLTypes</key><array> <dict> <key>CFBundleURLSchemes</key> <array> <string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string> </array> </dict></array>Wherever your Capacitor host app handles incoming URLs, forward them to the native SDK:
AppDelegate
复制到剪贴板import ContentsquareModule
func application( _ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { Contentsquare.handle(url: url) return true}SceneDelegate
SceneDelegateimport ContentsquareModule
func scene(_ scene: UIScene, openURLContexts urlContexts: Set<UIOpenURLContext>) { if let url = urlContexts.first?.url { Contentsquare.handle(url: url) }}SwiftUI
SwiftUIimport ContentsquareModule
.onOpenURL { url in Contentsquare.handle(url: url)}3. 验证安装
Section titled “3. 验证安装”- 在设备或模拟器上启动应用程序。
- 在 Xcode 或 Console 日志中过滤
CSLIB. - 打开 Contentsquare 移动工具并触发内应用功能以确认 deeplink 被处理。
继续从 iOS 设置
Section titled “从 iOS 设定继续”如果您正在使用 iOS 设定 来规划原生插件工作,连接它与 使用 @capgo/capacitor-contentsquare 为原生能力在使用 @capgo/capacitor-contentsquare 中 Capgo 插件目录 为产品工作流程在 Capgo 插件目录 中 Capacitor 插件由 Capgo 为实现细节在 Capacitor 插件由 Capgo 中 添加或更新插件 为实现细节在添加或更新插件中, Ionic 企业插件替代方案 为 Ionic 企业插件替代方案中的产品工作流程。