google / gcm

Google Cloud Messaging - client libraries and sample implementations
https://developers.google.com/cloud-messaging
Apache License 2.0
823 stars 514 forks source link

Always fail to get registration token with error "Code 7: 'null'" on iOS #242

Open ventus15 opened 7 years ago

ventus15 commented 7 years ago

Error Domain=com.google.iid Code=7 "(null)"

I followed the instructions in https://developers.google.com/cloud-messaging/ios/client to set up an iOS client for GCM, but I keep getting the unknown error message when I try to register for a registration token.

I have exponential backoff to try up to 10 times and each time, there is no change.

Does anyone have an idea of what's going on?

ogeidix commented 7 years ago

Could you try the FCM sdk and see if you have the same problem?

ventus15 commented 7 years ago

Adding the APNs cert to Firebase made it work

https://firebase.google.com/docs/cloud-messaging/ios/client#add_firebase_to_your_app