Getting initial notification in React Native seems not to work RN 0.59.x
.
https://github.com/react-native-community/react-native-push-notification-ios/issues/24
I'll try to find a solution. current possible solutions in my mind are:
1. Save userData in didReceiveRemoteNotification
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
// save userData to somewhere
}
2. Build a native module
Accessing userData via Native modules. It seems that we can access to userData after app launch.
UIApplicationLaunchOptionsRemoteNotificationKey not getting userinfo - https://stackoverflow.com/questions/30297594/uiapplicationlaunchoptionsremotenotificationkey-not-getting-userinfo
Top comments (1)
I solved. Our marketing tool saves data as deeplink, so notification couldn't get the data