mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 54b653e442 | |||
| 8487d9c823 | |||
| 7549e347b7 | |||
| a6fc0bc7a1 | |||
| 7a4943e820 | |||
| 05b3fb1b82 | |||
| f6ece7dd1e | |||
| b282d70b2f | |||
| 82c6532d12 | |||
| b8f79dd130 | |||
| 1e2a4ce0e4 | |||
| c708f396bd | |||
| 8b2a0daecc | |||
| 469af4fcd3 | |||
| 494df2e527 | |||
| 031acb9631 | |||
| 8d098d29b1 | |||
| a9343ac776 | |||
| de58071773 | |||
| 13341fd68a | |||
| edf29bbc8d | |||
| ae54960da4 | |||
| ea6011635f | |||
| 0829104534 | |||
| 592d5a5fb9 | |||
| 4753174bda | |||
| 3f077e32fd | |||
| 5c569d00da | |||
| c5f7963425 | |||
| a4eaf51455 | |||
| 04fae7d538 | |||
| 8e087e102a | |||
| 35c09c0c92 | |||
| f0a87962e7 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jpush-phonegap-plugin",
|
"name": "jpush-phonegap-plugin",
|
||||||
"version": "3.3.1",
|
"version": "3.3.0",
|
||||||
"description": "JPush for cordova plugin",
|
"description": "JPush for cordova plugin",
|
||||||
"cordova": {
|
"cordova": {
|
||||||
"id": "jpush-phonegap-plugin",
|
"id": "jpush-phonegap-plugin",
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ NSDictionary *_launchOptions;
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{
|
-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{
|
||||||
NSMutableDictionary *userInfo = @{}.mutableCopy;
|
NSMutableDictionary *userInfo = @[].mutableCopy;
|
||||||
|
|
||||||
if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
|
if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
|
||||||
userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo];
|
userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo];
|
||||||
@@ -169,10 +169,6 @@ NSDictionary *_launchOptions;
|
|||||||
userInfo[@"identifier"] = notification.request.identifier;
|
userInfo[@"identifier"] = notification.request.identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([userInfo[@"aps"][@"content-available"] isEqualToNumber:@(1)]) {// content-available 当用户开启后台推送是,防止触发两次事件
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
|
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
|
||||||
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
|
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user