Zum Inhalt springen

Datenschutz-Manifest und iOS-URL-Handler

GitHub

Wenn Sie Google, Facebook oder Apple-Login verwenden, müssen Sie die von diesen SDKs gesammelten Daten in Ihrer App angeben. PrivacyInfo.xcprivacy file. Fügen Sie das Datei in Ihrer App an ios/App/PrivacyInfo.xcprivacy.

Fügen Sie diesen Datei nicht zum Plugin-Paket hinzu. Anpassen Sie die Datentypen an Ihre App-Anwendung und die Anbieterdokumentation von SDK.

Google Sign-In-Beispiel

Auf die Zwischenablage kopieren
{
"NSPrivacyCollectedDataTypes": [
{ "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }
]
}
{
"NSPrivacyCollectedDataTypes": [
{ "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "FriendsList", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }
]
}
{
"NSPrivacyCollectedDataTypes": [
{ "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false },
{ "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }
]
}

Überprüfen Dokumentation von Apples Datenschutzmanifest für alle erlaubten Schlüssel und Werte.

Wenn ein iOS-App sowohl Facebook als auch Google-Login verwendet, leite die Callback-URL an beide SDKs weiter, bevor du sie an Capacitor zurückgibst.

In ios/App/App/AppDelegate.swift:

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
// Return true if the URL was handled by either Facebook or Google authentication.
if FBSDKCoreKit.ApplicationDelegate.shared.application(
app,
open: url,
sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
annotation: options[UIApplication.OpenURLOptionsKey.annotation]
) || GIDSignIn.sharedInstance.handle(url) {
return true
}
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
}

Make sure AppDelegate.swift importiert die von Ihrer App verwendeten SDKs:

import Capacitor
import FBSDKCoreKit
import GoogleSignIn
import UIKit