我目前正在實施Firebase手機身份驗證,並且可以成功實現使用Firebase UI的手機身份驗證而無需調整,但是從我的研究看來,實現無需滾動的Firebase手機身份驗證需要用戶允許通知。我知道firebase會發送無聲通知,但無需通過允許通知即可獲得批准,但似乎只有在不調整的情況下才能獲取該通知的方法是要求用戶允許通知。有誰知道如何或如果它可能做到這一點,而不需要調整和沒有要求用戶通知權限?使用Firebase電話身份驗證沒有得到通知
我已添加推送通知證書到firebase,並添加了firebase phone ui文檔中列出的所有必需功能。
而不要求用戶爲允許將通知從手機驗證文檔中列出此功能不會被調用(用戶也選擇允許)
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Pass device token to auth
Auth.auth().setAPNSToken(deviceToken, type: AuthAPNSTokenTypeProd)
// Further handling of the device token if needed by the app
// ...
}
如果這個功能不叫setAPNSToken不集,我不會沉默的通知,繼續與電話驗證,我一定要得到的一般錯誤
Authentication error: There seems to be a problem with your project's Firebase phone number authentication set-up, please make sure to follow the instructions found at https://firebase.google.com/docs/auth/ios/phone-auth