diff --git a/ios/RNFIRMesssaging.m b/ios/RNFIRMesssaging.m index 5dcfe7792f5a1b2a82ef0d8478dcaae2d08ed27b..208e8bf7155e4ec261e44933a074101982220b42 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]);