PushNotificationIOS.getInitialNotification() returns null for Remote Notification on cold start #23752
Labels
API: PushNotificationIOS
Bug
Platform: iOS
iOS applications.
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
🐛 Bug Report
Same issue as #9372, I am using the PushNotificationIOS.getInitialNotification function to check if the app is opened from a notification. This works when the app is launched from the background but not when the app has been force closed.
To Reproduce
Expected Behavior
Expect a non-null notification in PushNotificationIOS.getInitialNotification and appOpenedByNotificationTap should be triggered. Instead, the notification is null.
Code Example
in composition.js:
Environment
Environment:
OS: macOS High Sierra 10.13.6
Node: 9.3.0
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
The text was updated successfully, but these errors were encountered: