I have gone through the official notification and followed all steps. Also APN certificates are already uploaded on firebase. When i push notifciation from Grow section manually, i receive notification but while while entering phone number with country code in my app, i am getting the following errors.
This fake notification should be forwarded to Firebase Auth
Optional(Error Domain=FIRAuthErrorDomain Code=17054 "If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth's canHandleNotificaton: method." UserInfo={NSLocalizedDescription=If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth's canHandleNotificaton: method., FIRAuthErrorUserInfoNameKey=ERROR_NOTIFICATION_NOT_FORWARDED})
In Google info.plist, isfirebaseProxyEnable is also set to No.
DidreceiveRemoteNotification method also implemented.
Please help me in solving this problem.
To fix this, make sure you have this function in you AppDelegate file:
func application(_ application: UIApplication, didReceiveRemoteNotification notification: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
if Auth.auth().canHandleNotification(notification) {
completionHandler(.noData)
return
}
}
It seems that you don't have APNs set up correctly, check that:
I assume that you have an internet connection during the tests.
If any points of the above need to change, just delete the app completely from the device before re-compile and run it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With