Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Invalid registration token. Check the token format

I am new for Firebase as well as for iOS. I am trying to send push notification using FCM.

I registered an iOS app on FCM. Both .p12 certificates added. Code developed according to FCM.

While sending notification through the Firebase Console, I'm getting the error Invalid registration token. Check the token format.. I don't what mistake I did.

FCM Console

like image 943
Shreejay Pendse Avatar asked Dec 27 '16 10:12

Shreejay Pendse


1 Answers

There are two tokens you get at iOS side

  1. Token generated by iOS which is received in method didRegisterForRemoteNotificationsWithDeviceToken

  2. Token generated by Firebase FIRInstanceID.instanceID().token() (this you can print in AppDelegate)

The issue you are facing is because firebase console portal requires token received by way 2 and you are using token received by way 1.

like image 101
Aditya Deshmane Avatar answered Oct 20 '22 07:10

Aditya Deshmane