【问题标题】:FireBase PhoneNumber Verification Error In SwiftSwift中的FireBase电话号码验证错误
【发布时间】:2017-07-07 06:36:10
【问题描述】:
我正在我的应用程序中实施 Firebase 电话号码验证。然后在我的应用程序中生成错误:
如果禁用了 app delegate swizzling,则 UIApplicationDelegate 收到的远程通知需要转发到 FIRAuth 的 canHandleNotificaton: 方法。
【问题讨论】:
标签:
ios
iphone
firebase
swift3
firebase-authentication
【解决方案1】:
您可能会错过在 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)
}