【问题标题】:FireBase PhoneNumber Verification Error In SwiftSwift中的FireBase电话号码验证错误
【发布时间】:2017-07-07 06:36:10
【问题描述】:

我正在我的应用程序中实施 Firebase 电话号码验证。然后在我的应用程序中生成错误:

如果禁用了 app delegate swizzling,则 UIApplicationDelegate 收到的远程通知需要转发到 FIRAuth 的 canHandleNotificaton: 方法。

【问题讨论】:

  • 不,我完全遵循 FireBase 文档
  • 是的,我也用这个方法
  • 你能告诉我们你的 AppDelegate 吗?

标签: 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)
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-28
    • 1970-01-01
    • 2018-05-17
    • 1970-01-01
    • 2019-11-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多