コンテンツにジャンプ

iOS セットアップ

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

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

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
セクション「2. Contentsquare ディープリンクを前方に送信する」

Capacitorホストアプリが受け取るURLを処理する場所で、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モバイルツールをオープンし、インストールが完了したことを確認します。