While configuring my iOS app to receive push notifications through Firebase Cloud Messaging, I’ve been stuck trying to make the push notifications sent by the server work. However, when I test using the FCM console, the test notification arrives in the iPhone.
I have tried a lot of different configurations in the AppDelegate, with swizzling on and off.
Does anyone have any clue on what could I be possibly missing?
2
Answers
Turns out it was necessary to send the notification content specifically for APNS, in the APNS field of the message. Found out by reading this topic.
At all, you should add several methods. Also, you can use
https://icloud.developer.apple.com/dashboard/notifications
for the test, for this you will needdeviceToken
from point 2. Also, your server should add parameterssound: default
andmutable-content: 1
.1.