Skip to content

Commit

Permalink
fix (receive pn): fixed receivePN not called on iOS10
Browse files Browse the repository at this point in the history
  • Loading branch information
davebcn87 committed Jan 25, 2017
1 parent 704b253 commit 36491f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ios/ParsePushPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ + (void)saveDeviceTokenToInstallation: (NSData*)deviceToken

-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
NSLog(@"User info %@", notification.request.content.userInfo);

UIApplication *application = [UIApplication sharedApplication];
[self jsCallback:notification.request.content.userInfo withAction:(application.applicationState == UIApplicationStateActive) ? @"RECEIVE" : @"OPEN"];

completionHandler(UNNotificationPresentationOptionAlert);
}

Expand Down

0 comments on commit 36491f0

Please sign in to comment.