Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FireBase PhoneNumber Verification Error In Swift

I am implementing Firebase phoneNumber Verification in my Application. Then error Generate in my Application :

If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth\'s canHandleNotificaton: method.

like image 712
Amul4608 Avatar asked Jul 07 '17 06:07

Amul4608


1 Answers

you might missed to add this method in your 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)
}
like image 146
Mohmmad S Avatar answered Oct 23 '22 04:10

Mohmmad S