Notification data missing when sending notification to closed iOS app

In an app targeting both iOS and Android, I’m using notifications to open the app to a specific page specified in the notification data.

A notification comes in and clicking the notification navigates the app to a given page. (If the app is in the foreground on iOS no notification is displayed to the user but the app handles the notification data and navigates to the correct page.)

All in all there are twelve possible scenarios listed below. And I have the app working in all scenarios but two. On iOS when the app is not running (i.e. actually closed - not just in the background) and a user clicks a notification the app will launch but no notification data is available.

  • iOS in Expoclient Foreground - works

  • iOS in Expoclient Background - works

  • iOS in Expoclient Closed - clicking notification brings up the expo client but not my app within it

  • iOS standalone Foreground - works

  • iOS standalone Background - works

  • iOS standalone Closed - clicking notification opens my app but no notification data is available

  • Android in Expoclient Foreground - works

  • Android in Expoclient Background - works

  • Android in Expoclient Closed - works

  • Android standalone Foreground - works

  • Android standalone Background - works

  • Android standalone Closed - works

I log the the props supplied to the App component from the constructor and in the problematic cases there is no notification data in the props. In all other cases the notification data is present.

I don’t know if it’s relevant but here’s my app.json

{
  "expo": {
    "name": "xxxxxxxxxx",
    "slug": "xxxxxxxxxx",
    "sdkVersion": "32.0.0",
    "orientation": "portrait",
    "version": "0.0.2",
    "description": "",
    "icon": "./src/static/appicons/bigIcon.png",
    "splash": {
      "backgroundColor": "#f3f528",
      "resizeMode": "contain",
      "image": "./src/static/images/splash3.png"
    },

    "ios": {
      "bundleIdentifier": "xxxxxxxxxxxxxxx"
    },
    "android": {
      "package": "xxxxxxxxxxxxxxxx",
      "permissions": []
    }
  }
}

Hey @oivvio,

Thanks for the detailed report. We’re aware of this issue and are tracking it on github here! Follow along there for updates.

Cheers,
Adam

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.