Skip to content

Commit

Permalink
Merge pull request avivais#92 from davebcn87/fix-ios-10-receive-pn
Browse files Browse the repository at this point in the history
fix (receive pn): fixed receivePN not called on iOS10
  • Loading branch information
taivo authored Mar 20, 2017
2 parents 23dc9f6 + 36491f0 commit bf343b1
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 bf343b1

Please sign in to comment.