2

I am working on a hybrid app where I am using push notifications. It works well in Android (GCM via FCM) but does not in IOS (APNS via FCM).

The error:

Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"

and

Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 "(null)"

Getting the FCM token properly but it is not able to get the APNS token (IOS 9.3) and hence no notifications both in foreground and background mode.

Certificates are valid. Tried pushing directly via Firebase console and also using the cordova-plugin-fcm plugin (which works properly for android).

Push notification, Background Mode->Remote notification, Keychain sharing has been enabled.

It does not retry after the first attempt as well. This is the one and only error message and there is no log after this.

Certificate files and Provision Profiles are correct.

Tried with and without FirebaseAppDelegateProxyEnabledflag in the Plist file.

enter image description here

Referred:

How to fix Failed to fetch default token error?

Firebase (FCM) Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001

https://github.com/fechanique/cordova-plugin-fcm/issues/61

https://groups.google.com/forum/#!topic/firebase-talk/QVGrVp6C4_I

Community
  • 1
  • 1
Vignesh T.V.
  • 1,790
  • 3
  • 27
  • 48

0 Answers0