From d8a3d25ba0840f4a2a479bb6aa9dd24a05497521 Mon Sep 17 00:00:00 2001 From: David Stoker Date: Thu, 26 Oct 2017 22:39:45 -0400 Subject: [PATCH] Fix setting of the `openedLocalNotification` to use the `userInfo` from the `UILocalNotification` if it exists instead of the `UILocalNotification` itself --- RNNotifications/RNNotifications.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNNotifications/RNNotifications.m b/RNNotifications/RNNotifications.m index 9e5f5c7..e82cdf0 100644 --- a/RNNotifications/RNNotifications.m +++ b/RNNotifications/RNNotifications.m @@ -222,7 +222,8 @@ RCT_EXPORT_MODULE() object:nil]; [RNNotificationsBridgeQueue sharedInstance].openedRemoteNotification = [_bridge.launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; - [RNNotificationsBridgeQueue sharedInstance].openedLocalNotification = [_bridge.launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; + UILocalNotification *localNotification = [_bridge.launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; + [RNNotificationsBridgeQueue sharedInstance].openedLocalNotification = localNotification ? localNotification.userInfo : nil; } /* -- 2.26.2