Privacy Manifest dan iOS URL Handlers
Salin prompt setup yang berisi langkah install dan panduan markdown lengkap untuk plugin ini.
Privacy manifest untuk developer aplikasi
Bagian berjudul “Privacy manifest untuk developer aplikasi”Jika Anda menggunakan login Google, Facebook, atau Apple, deklarasikan data yang dikumpulkan oleh SDK tersebut di dalam PrivacyInfo.xcprivacy file aplikasi Anda. Tambahkan file tersebut di ios/App/PrivacyInfo.xcprivacy.
Jangan tambahkan file ini ke paket plugin. Sesuaikan tipe data agar sesuai dengan penggunaan di aplikasi Anda dan dokumentasi provider SDK.
Contoh Google Sign-In
Bagian berjudul “Contoh Google Sign-In”{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "UserID", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Contoh Facebook Login
Bagian berjudul “Contoh 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 } ]}Contoh Apple Sign-In
Bagian berjudul “Contoh Apple Sign-In”{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Tinjau Dokumentasi privacy manifest Apple untuk semua key dan value yang diizinkan.
Gabungkan handler URL Facebook dan Google
Bagian berjudul “Combine Facebook and Google URL handlers”Saat aplikasi iOS menggunakan login Facebook dan Google, arahkan callback URL ke kedua SDK tersebut sebelum diteruskan kembali ke Capacitor.
Di 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)}Pastikan AppDelegate.swift mengimpor SDK yang digunakan oleh aplikasi Anda:
import Capacitorimport FBSDKCoreKitimport GoogleSignInimport UIKit