From 4585a13d7b4c11ba8996e51ec40e3310b87f1348 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Wed, 13 Dec 2017 13:32:34 +0800 Subject: [PATCH] update localnotification event field --- src/ios/Plugins/AppDelegate+JPush.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index b4943d9..7198d66 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -143,10 +143,11 @@ NSDictionary *_launchOptions; userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; } else { UNNotificationContent *content = notification.request.content; - userInfo = @{@"content": content.body, - @"badge": content.badge, - @"extras": content.userInfo - }; + userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, + @"badge": content.badge, + @"extras": content.userInfo + }]; + userInfo[@"identifier"] = notification.request.identifier; } [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]]; @@ -165,6 +166,7 @@ NSDictionary *_launchOptions; @"badge": content.badge, @"extras": content.userInfo }]; + userInfo[@"identifier"] = notification.request.identifier; } userInfo[@"actionIdentifier"] = response.actionIdentifier; [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]];