Zum Inhalt springen

iOS Einrichtung

GitHub

Die Inhalte von Contentsquare werden automatisch gestartet, sobald das Plugin installiert ist, aber iOS-fremde Funktionen wie SDK-Protokoll, Screenshot-Kapturen und Wiedergabe-Konfigurationen benötigen die Aufbereitung der URL-Handling-Setup.

Hinzufügen cs-$(PRODUCT_BUNDLE_IDENTIFIER) zu Ihren App-URL-Schemes in Xcode oder Ihrem Host-App’s Info.plist.

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

Wo immer Ihr Capacitor-Host-App eingehende URLs verarbeitet, leiten Sie sie an den nativen 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)
}
  • Die App auf einem Gerät oder Simulator starten.
  • Filter Xcode- oder Console-Protokolle mit CSLIB.
  • Öffnen Sie die Contentsquare-Mobil-Tooling und aktivieren Sie in-app-Funktionen, um zu bestätigen, dass der Deeplink bearbeitet wird.

Wenn Sie native Plugin-Arbeit planen, verwenden Sie iOS-Einrichtung um es mit Mit @capgo/capacitor-contentsquare für die native Fähigkeit in Mit @capgo/capacitor-contentsquare, Capgo Plugin-Verzeichnis für den Produktworkflow in Capgo Plugin-Verzeichnis, Capacitor Plugins von Capgo für die Implementierungsdetails in Capacitor Plugins durch Capgo, Plugins hinzufügen oder aktualisieren für die Implementierungsdetails in Plugins hinzufügen oder aktualisieren, und Alternativen zu Ionic Enterprise Plugins für das Produktworkflow in Alternativen zu Ionic Enterprise Plugins.