From 36491f02e378e8087eef00ed4b286282c6542a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cort=C3=A9s?= Date: Wed, 25 Jan 2017 17:52:32 +0100 Subject: [PATCH] fix (receive pn): fixed receivePN not called on iOS10 --- src/ios/ParsePushPlugin.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ios/ParsePushPlugin.m b/src/ios/ParsePushPlugin.m index 3a00e0c0..b34af53e 100644 --- a/src/ios/ParsePushPlugin.m +++ b/src/ios/ParsePushPlugin.m @@ -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); }