onNotification callback handler not getting called in iOS for remote notifications
This happens when the application is in a killed state and I receive a notification and if i click on it, the onNotification callback handler is never called. This works when the application is in active state. I tried everything and gone through all issues similar to this posted by people on github but without any progress, also I rechecked notification configuration in Xcode. Any help would be appreciated.
@nairabhijit is onNotification called after you tap on the notification?
No it doesn't and this is what the issue is.
Have you enabled push notification capability in xcode?
Do you get this message, when you click on Notifications a few times?
Multiple notification open events received before the JS notifications module has been initialized.
Then this might be related to #1026
I resolved the issue by following this link. I had to do a lot of code rewrites, I had to replace library wix react-native-navigation with react-navigation, as I wasn't knowing how to set the appProperties to rootView in AppDelegate.m file with react-native-navigation. Also I figured out later that on release environment I am able to get the notification in PushNotiifcation.getInitialNotification() but not with debug environment. The behaviour is very inconsistent. Nevertheless now I am able to get the notification in debug as well as release environment when the application is in killed state.
any success?
match this with ur Appdelegate.m
https://github.com/zo0r/react-native-push-notification/blob/master/example/ios/example/AppDelegate.m
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.