我正在我的应用程序中实现Firebase phoneNumber验证。然后错误在我的应用程序中生成:
如果禁用了app delegate swizzling,则需要将UIApplicationDelegate收到的远程通知转发给FIRAuth的canHandleNotificaton:方法。
答案 0 :(得分:2)
您可能会错过在AppDelegate中添加此方法
func application(_ application: UIApplication,
didReceiveRemoteNotification notification: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
if Auth.auth().canHandleNotification(notification) {
completionHandler(.noData)
return
}
// This notification is not auth related, developer should handle it.
handleNotification(notification)
}