From 8be0945a8f73fb595c83721bd16d22ecc43bf3be Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 20 Dec 2016 15:30:41 -0500 Subject: [PATCH] fix initial local notification --- ios/RNFIRMesssaging.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/RNFIRMesssaging.m b/ios/RNFIRMesssaging.m index 5dcfe77..208e8bf 100644 --- a/ios/RNFIRMesssaging.m +++ b/ios/RNFIRMesssaging.m @@ -181,9 +181,9 @@ RCT_EXPORT_MODULE() } RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){ - NSDictionary *localUserInfo = _bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; - if(localUserInfo){ - resolve([localUserInfo copy]); + UILocalNotification *localUserInfo = _bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; + if (localUserInfo) { + resolve([[localUserInfo userInfo] copy]); return; } resolve([_bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]); -- 2.26.2