Firebase IOS push notification doest not work when app is closed. I have followed all the steps as in documentation
Asked
Modified
7 years, 10 months ago
Viewed
5k times
Part of Mobile Development and Google Cloud Collectives
3 Answers
It's a quick fix, simply add "priority": "high" in your payload next to "notification" etc. and the iOS Notification will work when the app is in the background.
So this will work:
"to":"TOKEN ID",
"notification" : {
"body" : "test"
},
"priority": "high"
}
-
I'm stuck in a similar issue, I'm sending data notification instead of normal push notifications and can not receive data from notifications when the app is closed (not even running in background). Is there a workaround for this? Commented Dec 28, 2017 at 14:09
What worked for me was simply adding title
to the notification
like this:
"notification" : {
"title": "foo",
"body" : "bar"
}
Please try with this, hope it works:
POST https://gcm-http.googleapis.com/gcm/send
{
"to": "TOKEN_ID",
"priority": "high",
"notification": {
"title": "foo",
"body": "bar"
}
}