Privacy Manifest y URL Handlers de iOS
Copia un prompt de configuración con los pasos de instalación y la guía completa en markdown para este plugin.
Privacy manifest para desarrolladores de apps
Sección titulada “Privacy manifest para desarrolladores”Si usas Google, Facebook o Apple login, declara los datos que recopilan esos SDKs en el PrivacyInfo.xcprivacy archivo de tu app. Añade el archivo en tu app en ios/App/PrivacyInfo.xcprivacy.
No incluyas este archivo en el paquete del plugin. Ajusta los tipos de datos según el uso de tu app y la documentación de SDK.
Ejemplo de Google Sign-In
Sección titulada “Ejemplo de Google Sign-In”{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Ejemplo de Facebook Login
Sección titulada “Ejemplo de Facebook Login”{ "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 } ]}Ejemplo de Apple Sign-In
Sección titulada “Ejemplo de Apple Sign-In”{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Revisión Documentación del privacy manifest de Apple para todas las claves y valores permitidos.
Combinar handlers de URL de Facebook y Google
Sección titulada “Combinar los handlers de URL de Facebook y Google”Cuando una app de iOS usa login de Facebook y Google, redirige la URL de callback a ambos SDKs antes de pasarla de vuelta a Capacitor.
En 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)}Asegúrate de que AppDelegate.swift importa los SDKs que usa tu app:
import Capacitorimport FBSDKCoreKitimport GoogleSignInimport UIKit