On iOS, foreground notifications when app is opened contain empty data. I receive an event when the notification is received thanks to the following line
The difference here is iOS’s display of notifications vs. what Expo programmatically exposes. (Foreground vs. background is unrelated.) We would like to expose the displayed data in the programmatic data on iOS but currently don’t right now.
For now, you want to access the data programmatically you can send it in the “data” field of the payload, covered in the push notification docs.