隐私声明和 iOS URL 处理程序
复制一个包含安装步骤和该插件的完整 Markdown 指南的设置提示。
应用开发者隐私清单
应用开发者隐私清单如果您使用Google、Facebook或Apple登录,声明这些SDK收集的数据在您的应用中。 PrivacyInfo.xcprivacy 在您的应用中添加文件。 ios/App/PrivacyInfo.xcprivacy.
不要将此文件添加到插件包中。根据您的应用的使用情况和SDK提供商的文档调整数据类型。
Google Sign-In示例
Google Sign-In示例{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Facebook Login示例
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 } ]}Apple Sign-In示例
Apple Sign-In示例{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Review Apple的隐私宣言文档 为所有允许的键和值进行审查。
结合Facebook和GoogleURL处理器
标题为“结合Facebook和GoogleURL处理器”当iOS应用程序使用Facebook和Google登录时,先将回调URL路由到两个SDK,然后将其传回Capacitor。
在 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)}确保 AppDelegate.swift 应用程序导入所使用的SDK:
import Capacitorimport FBSDKCoreKitimport GoogleSignInimport UIKit