IOS Notifications do not receive on background
First, this for this beautiful repo!
Now I'm went through all the steps, and for Local notifications It does work really well. But when app is in background, there is no notifications.
Yes I've added " "content_available": true"
So when I'm sending:
let body = {
"to": token,
"content_available": true,
"notification": {
"title": "hello",
"body": "yo",
"click_action": "fcm.ACTION.HELLO",
},
"data": {
"extra":"juice",
}
};
Registering:
FCM.requestPermissions(); // for iOS
FCM.getFCMToken().then(token => {
console.log(token);
self._setToken(token);
});
And I'm using v5.0.
When I checked, I noticed in Xcode that this methods:
didReceiveNotificationResponse didReceiveRemoteNotification
Are never called!
Do I need to add the p12 file to somewhere in firebase? What I'm I missing?
Thanks
you need to add p12 in firebase console, but you don't need to include in source code what is the endpoint response when you send the payload to fcm? Are you using iphone rather than emulator?
@evollu adding the p12 to firebase did the trick! I didnt find it and there is no mention for this in the documentary. Thank you so much for you quick response and for this repo,
Closing issue.
I am also not receiving push notifications when app in background. however when app in foreground and opened I can read the the incoming message. What exactly is the p12?
https://firebase.google.com/docs/cloud-messaging/ios/certs
@evollu , oh I choose the APN key and uploaded that to firebase. Yet still no banner for notification in background. I even set the FirebaseAppDelegateProxyEnabled to No in info.plist.
you should leave FirebaseAppDelegateProxyEnabled as Yes. did you add permissions in xcode?
Sweet thanks @evollu I had to set the FirebaseAppDelegateProxyEnabled as Yes. that was it.
My notification listener isn't getting anything when sending message through firebase console.
@evollu is the p12 required when running an emulator?
@leu2tm emulator can't receive remote notif
Ok thanks for the quick clarification @evollu !
But shouldn't the log display that remote notification won't work then? I don't get anything at all..
Can you please put FirebaseAppDelegateProxyEnabled in Docs if i haven't found about it here I would be still losing my mind. @evollu Thank you alot for this repo and for helping us solve our problems
@leu2tm nope it won't. It is iOS limitation not Firebase
@M3po FirebaseAppDelegateProxyEnabled is documented on Firebase website and I suggest leaving it default. What should I put in Docs?
@evollu Than my bad as i didn't found it there. I meant for you to put it as notice if people can't seem to get it working on ios (nothing more), but if it is there then no need. Again thank you for all your work and help.
anyone can point FirebaseProxyEnabled option in xcode