I am engaged on Firebase Cloud Messaging with iOS and would respect any assist:
The issue
I adopted this doc on sending a take a look at notification and it’s not working.
What I’ve tried
I’ve sanity checked all the things I can consider on the iOS aspect and all of it appears good. Right here’s an inventory of issues I’ve checked up to now:
- I had my admin generate a keyID and personal key file on the Apple dev web site, and I uploaded it to my Firebase app.
- I put in the Firebase SDK on my iOS app and copied the GoogleService-Information.plist file to my Xcode venture.
- I registered for silent notifications with
utility.registerForRemoteNotifications()
. - I registered for express notifications with
UNUserNotificationCenter.present().requestAuthorization(choices: [.alert, .badge, .sound], completionHandler: { _, _ in })
. - I captured the Firebase machine token within the Firebase delegate technique
messaging(_: didReceiveRegistrationToken:)
. - I despatched a take a look at message to that machine token from
console.firebase.google.com/venture/<PROJECT_NAME>/notification/compose
.
To substantiate that the message is being despatched efficiently, I despatched a handbook POST request following this doc.
- I generated an entry token for it utilizing google-auth-library.
- I put the machine token within the request payload below
{"message": {"token": "..."}}
.
The request got here again with a 200 standing code. - I attempted it with a malformed entry token and machine token and it failed, so the machine token captured from iOS should be legitimate.
So it appears the message is being despatched. Moreover, the machine token I captured on iOS is legitimate when being despatched within the POST. So I consider there should be one thing unsuitable on the iOS aspect.
The one rationalization I can consider is perhaps a mismatch with the app bundle ID or APNs token. I’m not an admin so I can’t test the Apple developer web site for the token.
Does anybody have a clue what is likely to be going unsuitable?