Manifest Privasi dan Pengaturan URL iOS
Copy prompt pengaturan dengan langkah-langkah instalasi dan panduan markdown lengkap untuk plugin ini.
Manifest Privasi untuk Pengembang Aplikasi.
Bab berjudul “Manifest Privasi untuk Pengembang Aplikasi”.Jika Anda menggunakan login Google, Facebook, atau Apple, deklarasikan data yang dikumpulkan oleh SDK-SDK tersebut di aplikasi Anda di file. PrivacyInfo.xcprivacy Tambahkan file tersebut di aplikasi Anda di ios/App/PrivacyInfo.xcprivacy.
Jangan tambahkan file ini ke dalam paket plugin. Sesuaikan jenis data untuk menyesuaikan penggunaan aplikasi Anda dan dokumentasi SDK.
Contoh Google Sign-In.
Bab 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 Login Facebook.
Bab berjudul “Contoh Login Facebook”.{ "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 Sign-In Apple
Judul Bagian “Contoh Sign-In Apple”{ "NSPrivacyCollectedDataTypes": [ { "NSPrivacyCollectedDataType": "EmailAddress", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false }, { "NSPrivacyCollectedDataType": "Name", "NSPrivacyCollectedDataTypeLinked": true, "NSPrivacyCollectedDataTypeTracking": false } ]}Tinjau Dokumentasi Manifest Privasi Apple untuk semua kunci dan nilai yang diizinkan.
Gabungkan Pengaturan URL Facebook dan Google
Judul Bagian “Gabungkan Pengaturan URL Facebook dan Google”Ketika sebuah aplikasi iOS menggunakan baik Facebook dan Google login, arahkan URL panggilan balik ke kedua SDK sebelum melewatkan 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 mengimport SDK yang digunakan oleh aplikasi Anda:
import Capacitorimport FBSDKCoreKitimport GoogleSignInimport UIKit