[IOS] onNotification not working (triggered) when app on foreground
See original GitHub issueEverything is doing fine on Android and IOS. Except when on IOS and receiving and then clicking the notification when app on foreground, the onNotification callback is not working. But when I received and clicking the notification while the app is killed or not running, the app is starting up and then the onNotification callback work perfectly.
I use PushNotification.localNotificationSchedule
.
Any idea what is going on?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:19
- Comments:8
Top Results From Across the Web
onNotification doesnt trigger on iOS devices for remote ...
I have configured app as described in docs. On android it works fine (local and remote), but not on iOS. So i have...
Read more >firebase - Reactnative IOS pushotification/PushNotificationIOS ...
I used reactnative PushNotification/PushNotificationIOS modules , My issue is when notification received on foreground to my device IOS ,the ...
Read more >Ionic3.9 onNotification not triggered when app is in foreground ...
Hi Team, I have implemented push notification its working properly android in both foreground / background state and but in IOS ...
Read more >react-native-push-notification - npm
React Native Local and Remote Notifications for iOS and Android ... Read the troubleshooting guide before raising an issue.
Read more >Sometime tapping on notification's… | Apple Developer Forums
Sometime tapping on notification's action button is not firing ... iap2d[177] <Warning>: process com.myapp.watchkitapp is now running the foreground Sep 29 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After spending 3 days on this, in my case turns out the APN notification generated by the backend was missing the property
"content-available": 1
. once I added that to the “aps” object, onNotification started to fire! here is an example notification structure (from the apple docs):}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.