__CAPGO_KEEP_0__ - __CAPGO_KEEP_1__ アプリのリアルタイム更新

iOS セットアップ

プラグインのインストール後、自動的にContentsquareのトラッキングが開始されますが、iOSのインアプリ機能であるSDKログ、スクリーンショットのキャプチャ、リプレイの設定は、上流のURLハンドリングの設定が必要です。

1. URLスキームを追加

1. URLスキームを追加

追加 cs-$(PRODUCT_BUNDLE_IDENTIFIER) Xcodeまたはホストアプリの Info.plist.

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
2. Contentsquareのディープリンクを転送

ホストアプリが入力URLを受け取る場所で、CapacitorのURLをネイティブのSDKに転送します。

AppDelegate

コピー
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ログをフィルタリングします。
  • Contentsquareモバイルツールをオープンし、インアプリ機能をトリガーして、デープリンクが正しく処理されていることを確認します。 CSLIB.
  • エディットページ