Zum Inhalt springen

iOS-Setup

GitHub

Das Contentsquare-Tracking startet automatisch nach der Installation des Plugins. iOS-In-App-Funktionen wie SDK Logs, Screenshot-Aufnahmen und Replay-Konfigurationen erfordern jedoch noch das Setup für das Upstream-URL-Handling.

Füge cs-$(PRODUCT_BUNDLE_IDENTIFIER) zu den URL-Schemes deiner App in Xcode oder der deiner Host-App Info.plist.

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>

Dort, wo deine Capacitor Host-App eingehende URLs verarbeitet, leite sie an das native SDK weiter:

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)
}
  • Starte die App auf einem Gerät oder Simulator.
  • Filtere Xcode- oder Console-Logs mit CSLIB.
  • Öffne die Contentsquare Mobile Tooling und aktiviere In-App-Features, um zu prüfen, ob der Deeplink korrekt verarbeitet wird.

Wenn du es nutzt iOS-Setup Um die Arbeit an nativen Plugins zu planen, verbinde sie mit Verwendung von @capgo/capacitor-contentsquare für die native Funktion in „Verwendung von @capgo/capacitor-contentsquare“, Capgo Plugin-Verzeichnis für den Produkt-Workflow im Capgo Plugin-Verzeichnis, Capacitor Plugins von Capgo für das Implementierungsdetail in Capacitor Plugins von Capgo, Plugins hinzufügen oder aktualisieren für das Implementierungsdetail beim Hinzufügen oder Aktualisieren von Plugins, und Ionic Enterprise Plugin-Alternativen für den Produkt-Workflow bei den Ionic Enterprise Plugin-Alternativen.