Commit 8be0945a authored by Libin Lu's avatar Libin Lu

fix initial local notification

parent 6a9c757a
...@@ -181,9 +181,9 @@ RCT_EXPORT_MODULE() ...@@ -181,9 +181,9 @@ RCT_EXPORT_MODULE()
} }
RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){ RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){
NSDictionary *localUserInfo = _bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; UILocalNotification *localUserInfo = _bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey];
if(localUserInfo){ if (localUserInfo) {
resolve([localUserInfo copy]); resolve([[localUserInfo userInfo] copy]);
return; return;
} }
resolve([_bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]); resolve([_bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment