question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications not received when app is suspended iOS 11

See original GitHub issue

RN: 0.48.4 react-native-fcm: 9.5.0 iPhone 7+ iOS 11 @evollu

With the new iOS 11 update, push notifications are now received if the app is in the background, but they fail to arrive if the app is in suspended state. No logs are shown and no notification is shown.

When the app is open, push notifications are received as a callback (expected).

I’ve added content_available true to the payload, what else is needed to ensure the push is always delivered?

    admin.messaging()
    .sendToDevice(token, {
      notification: {
        title: 'title',
        body: 'body',
      }
    }, {
      contentAvailable: true,
      priority: 'high',
      timeToLive: 60 * 30,
      show_in_foreground: true
    })

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:36 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
evollucommented, Oct 5, 2017

just a reminder, FirebaseInstanceID >2.0.1 has known issue with iOS11, make sure you have pod 'FirebaseInstanceID', '2.0.0' in your pod file

1reaction
evollucommented, Oct 11, 2017

cool, let keep tracking it

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS push notification not received when app suspended
If the app is running and the user presses the home button, meaning the app is now suspended, the push notifications aren't triggering ......
Read more >
Ios – Silent pushes not delivered to the app on iOS 11 - iTecNote
Start the app on device; Send the above silent push. Expected: The app is brought from suspended state to background and the didReceiveRemoteNotification: ......
Read more >
Will iOS awake my app when i receive silent push notification ...
4) Trigger the didReceiveRemoteNotification when received silent push notification. - This is working when app in running and suspended state. - Not working ......
Read more >
Timer im background Task not possible? - Apple Developer
As Claude31 says, running timers in the background is tricky because, in general, the system will suspend your app shortly after it moves...
Read more >
Determine if the App is terminated by the User or by iOS
Suspended apps get unloaded from memory without additional callbacks. ... was called for apps normally was in iOS 3.1 or so, as the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found