Privacy Manifest und iOS URL Handlers
Kopiere einen Setup-Prompt mit den Installationsschritten und dem vollständigen Markdown-Guide für dieses Plugin.
Privacy Manifest für App-Entwickler
Abschnitt „Privacy Manifest für App-Entwickler“Wenn du Google-, Facebook- oder Apple-Login nutzt, musst du die von diesen SDKs gesammelten Daten in deinem PrivacyInfo.xcprivacy file angeben. Füge die Datei in deiner App unter ios/App/PrivacyInfo.xcprivacy.
Füge diese Datei nicht dem Plugin-Package hinzu. Passe die Datentypen an deine App und die Dokumentation des Providers SDK an.
Google Sign-In Beispiel
Abschnitt mit dem Titel „Google Sign-In Beispiel“{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Facebook Login Beispiel
Abschnitt mit dem Titel „Facebook Login Beispiel“{ "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 } ]}Apple Sign-In Beispiel
Abschnitt mit dem Titel „Apple Sign-In Beispiel“{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Review Apples Privacy Manifest Dokumentation für alle erlaubten Keys und Values.
Facebook und Google URL-Handler kombinieren
Abschnitt „Facebook- und Google-URL-Handler kombinieren“Wenn eine iOS-App sowohl Facebook- als auch Google-Login nutzt, leite die Callback-URL an beide SDKs weiter, bevor du sie an Capacitor zurückgibst.
Unter 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)}Stelle sicher, AppDelegate.swift importiert die von deiner App verwendeten SDKs:
import Capacitorimport FBSDKCoreKitimport GoogleSignInimport UIKit