iOS設定
このプラグインのセットアッププロンプトをコピーして、インストール手順とフルマークダウンガイドを取得します。
このプラグインがインストールされたら、自動的にContentsquareトラッキングが開始されますが、iOSアプリ内機能であるSDKログ、スクリーンショットキャプチャ、リプレイ設定はアップストリームURLハンドリング設定が必要です。
1. URLスキームを追加する
セクションタイトル:「1. 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 の deeplink を転送する
「2. Contentsquare の deeplink を転送する」Capacitor のホストアプリが受け取る URL を処理する場所で、SDK のネイティブに転送する
AppDelegate
「AppDelegate」import ContentsquareModule
func application( _ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { Contentsquare.handle(url: url) return true}SceneDelegate
「SceneDelegate」import ContentsquareModule
func scene(_ scene: UIScene, openURLContexts urlContexts: Set<UIOpenURLContext>) { if let url = urlContexts.first?.url { Contentsquare.handle(url: url) }}SwiftUI
「SwiftUI」import ContentsquareModule
.onOpenURL { url in Contentsquare.handle(url: url)}3. インストールの検証
セクション “3. インストールの検証”- デバイスまたはシミュレータでアプリを起動します。
- XcodeまたはConsoleログをフィルタリングします。
CSLIB. - Contentsquareモバイルツールをオープンし、インアプリ機能をトリガーして、デープリンクが正しく処理されていることを確認します。