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); }