fix application in activity notification will not alert in ios10

This commit is contained in:
huangminlinux 2018-02-01 10:11:03 +08:00
parent 83b7ca162a
commit 67421b5091
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.3.1",
"version": "3.3.2",
"description": "JPush for cordova plugin",
"cordova": {
"id": "jpush-phonegap-plugin",

View File

@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jpush-phonegap-plugin"
version="3.3.0">
version="3.3.2">
<name>JPush</name>
<description>JPush for cordova plugin</description>

View File

@ -169,12 +169,14 @@ NSDictionary *_launchOptions;
userInfo[@"identifier"] = notification.request.identifier;
}
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
if ([userInfo[@"aps"][@"content-available"] isEqualToNumber:@(1)]) {// content-available
return;
}
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
}
-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{