mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-02-19 00:07:08 +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,6 +1,6 @@
|
||||
{
|
||||
"name": "jpush-phonegap-plugin",
|
||||
"version": "3.3.2",
|
||||
"version": "3.3.0",
|
||||
"description": "JPush for cordova plugin",
|
||||
"cordova": {
|
||||
"id": "jpush-phonegap-plugin",
|
||||
|
||||
@@ -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.2">
|
||||
version="3.3.0">
|
||||
|
||||
<name>JPush</name>
|
||||
<description>JPush for cordova plugin</description>
|
||||
|
||||
@@ -156,7 +156,7 @@ NSDictionary *_launchOptions;
|
||||
}
|
||||
|
||||
-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{
|
||||
NSMutableDictionary *userInfo = @{}.mutableCopy;
|
||||
NSMutableDictionary *userInfo = @[].mutableCopy;
|
||||
|
||||
if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
|
||||
userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo];
|
||||
@@ -169,14 +169,8 @@ 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{
|
||||
|
||||
Reference in New Issue
Block a user