我目前正在实施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