react-native-fcm: Can't receive notification on background and some other problems [IOS]

Hey,

İ did everything but i still can’t receive any notifications when my app is on background. Here is an example request:

{
  "to": "XXXX",
  "content_available": true,
  "priority": "high",
  "notification": {
     "title": "Please",
     "body": "Work"
  }
}

Other than that, i can receive notifications on my ios 9 iphone on foreground, but i don’t receive anything on my ios 10 iphone.

I found something like this: https://firebase.google.com/docs/cloud-messaging/ios/receive

And there is one more thing i didn’t understand, even when i don’t allow notifications, or disable from settings, getFCMToken() function still returns a token, and i can send notifications.

So i am not sure if this library or FCM is stable, or is it a waste of time trying to adapt it atm.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 45 (17 by maintainers)

Most upvoted comments

@jnrepo Enable Push Notifications in Capabilities and @evollu Please add enable Push Notifications in Capabilities tab in Xcode project. There seems to be a lot of configuration to get push notifications working but we tend to forget the most basic things. 😃

I am using the simulator, it appears you can’t do remote push notifications on the simulator? http://stackoverflow.com/questions/21741259/push-notifications-in-mavericks-ios-simulator

@evollu thanks for the reply! But i couldn’t make the notification appear when the app is on the background, even when the permission is given. You can see my example request above, i get a success response but no notification.