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.
There are two tokens you get at iOS side
Token generated by iOS which is received in method didRegisterForRemoteNotificationsWithDeviceToken
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.