Ios Firebase电话验证reCAPTCHA验证在某些设备上不起作用
我正在使用Firebase UI电话验证最新版本的Firebase Auth构建iOS应用程序 当我尝试在我的设备上使用电话号码进行登录时,它似乎不需要reCAPTCHA验证,并且可以正常工作 相反,当我尝试在其他设备上运行该应用程序时,它需要进行reCAPTCHA验证,但当验证完成时,我突然发现屏幕保持空白,无法工作 我搜索了一些关于堆栈溢出的答案,并提到了在后台模式下启用某些功能(我启用了远程通知、后台提取、IP语音、音频、Airplay…)。他们在Google服务文件中提到的另一件事是,我必须将该URL复制到URL方案,当然我已经复制了它 以下是我的一些委托函数:Ios Firebase电话验证reCAPTCHA验证在某些设备上不起作用,ios,firebase,firebase-authentication,Ios,Firebase,Firebase Authentication,我正在使用Firebase UI电话验证最新版本的Firebase Auth构建iOS应用程序 当我尝试在我的设备上使用电话号码进行登录时,它似乎不需要reCAPTCHA验证,并且可以正常工作 相反,当我尝试在其他设备上运行该应用程序时,它需要进行reCAPTCHA验证,但当验证完成时,我突然发现屏幕保持空白,无法工作 我搜索了一些关于堆栈溢出的答案,并提到了在后台模式下启用某些功能(我启用了远程通知、后台提取、IP语音、音频、Airplay…)。他们在Google服务文件中提到的另一件事是,我
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
let firebaseAuth = Auth.auth()
if (firebaseAuth.canHandleNotification(userInfo)){
print("User infor ",userInfo)
return
}
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = deviceToken.hexString
print("====== This is device token ",deviceToken)
let firebaseAuth = Auth.auth()
// I used to set type .unknown to .prod as well and it doesn't work
firebaseAuth.setAPNSToken(deviceToken, type: .unknown)
InstanceID.instanceID().instanceID { (result, error) in
if let error = error {
NSLog("Error getting instance ID ", error.localizedDescription)
} else if let result = result {
Messaging.messaging().apnsToken = deviceToken
UserDefaults.standard.setFCMToken(value: result.token)
}
}
print("=============== Device token",deviceToken.description)
if let uuid = UIDevice.current.identifierForVendor?.uuidString {
print(uuid)
}
UserDefaults.standard.setValue(token, forKey: "ApplicationIdentifier")
UserDefaults.standard.synchronize()
}
还有什么我错过的吗?为什么它不能在其他iOS设备上工作??为什么它需要reCAPTCHA验证,然后在验证后屏幕保持空白???我不确定您运行的是什么iOS版本,但iOS 13的reCAPTCHA中存在一个问题,尚未解决
在请求验证ID之前,请输入以下代码
Auth.auth().settings?.isAppVerificationDisabledForTesting = true
您找到解决方案了吗?