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のディープリンクを転送
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}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. インストールの検証
デバイスまたはシミュレータでアプリを起動します。- XcodeまたはConsoleログをフィルタリングします。
- Contentsquareモバイルツールをオープンし、インアプリ機能をトリガーして、デープリンクが正しく処理されていることを確認します。
CSLIB. - エディットページ