react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

onNotification getting called before tapping notification

Open bhushansethi opened this issue 8 years ago • 2 comments

For remote push notifications: onNotification is getting called as soon as notification receives before even user taps notification. For local notifications: It doesn't call onNotification even after tapping it. I am using index.js referring to app.ios.ts and app.android.ts. I have tried adding PushNotification.configure in index.js and app.android.ts to keep it out of react native lifecycle but same result. Also, I am using react-native-navigation library in app.android.ts and that might be conflicting with it. Anybody facing same issue?

bhushansethi avatar Sep 17 '18 16:09 bhushansethi

@bhushansethi I guess you added the #import <React/RCTPushNotificationManager.h> to your AppDelegate.m otherwise the remote notifications wouldn't trigger anything but maybe you forgot this part ?

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
  [RCTPushNotificationManager didReceiveLocalNotification:notification];
}

colaskirschoff avatar Sep 21 '18 14:09 colaskirschoff

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.

github-actions[bot] avatar May 02 '20 00:05 github-actions[bot]