Onesignal "Apns Delegate Never Fired" while using Firebase Auth with and without swizzling

Viewed 225

I have issue with OneSignal push notifications for iOS app after I added Firebase Auth with phone. All iOS devices listed in OneSignal are marked with "Apns Delegate Never Fired" label and notifications can be sended but app don't receive them.

I found two similar issues that

As I understand the problem might be with swizzling that is used by Firebase Auth. I disabled swizzling using info.plist file as it suggested in the official firebase docs. But issue remains, so I think that I am missing something and OneSignal SDK still not being called.

My AppDelegate file looks like

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
           Auth.auth().setAPNSToken(deviceToken, type: AuthAPNSTokenType.unknown)
 }

 override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

           if Auth.auth().canHandleNotification(userInfo) {
               completionHandler(.noData)
               return
           }
}
0 Answers
Related