Changeset View
Changeset View
Standalone View
Standalone View
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | [CommIOSNotificationsBridgeQueue.sharedInstance | ||||
NSDictionary *notification = notifInfo[@"notification"]; | NSDictionary *notification = notifInfo[@"notification"]; | ||||
RCTRemoteNotificationCallback completionHandler = | RCTRemoteNotificationCallback completionHandler = | ||||
notifInfo[@"completionHandler"]; | notifInfo[@"completionHandler"]; | ||||
[CommIOSNotifications didReceiveRemoteNotification:notification | [CommIOSNotifications didReceiveRemoteNotification:notification | ||||
fetchCompletionHandler:completionHandler]; | fetchCompletionHandler:completionHandler]; | ||||
}]; | }]; | ||||
// Push opened remote notifications | // Push opened remote notifications | ||||
NSDictionary *openedRemoteNotification = [_bridge.launchOptions | NSDictionary *openedRemoteNotification = | ||||
objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; | CommIOSNotificationsBridgeQueue.sharedInstance.openedRemoteNotification; | ||||
if (openedRemoteNotification) { | if (openedRemoteNotification) { | ||||
CommIOSNotificationsBridgeQueue.sharedInstance.openedRemoteNotification = | CommIOSNotificationsBridgeQueue.sharedInstance.openedRemoteNotification = | ||||
nil; | nil; | ||||
NSDictionary *notifInfo = @{@"notification" : openedRemoteNotification}; | NSDictionary *notifInfo = @{@"notification" : openedRemoteNotification}; | ||||
[NSNotificationCenter.defaultCenter | [NSNotificationCenter.defaultCenter | ||||
postNotificationName:CommIOSNotificationsOpened | postNotificationName:CommIOSNotificationsOpened | ||||
object:self | object:self | ||||
userInfo:notifInfo]; | userInfo:notifInfo]; | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |