update to 3.3.3

This commit is contained in:
huangminlinux 2018-02-06 15:38:47 +08:00
parent 8ccdbd525b
commit 24328f2ac9
3 changed files with 20 additions and 22 deletions

View File

@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.3.2",
"version": "3.3.3",
"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.2">
version="3.3.3">
<name>JPush</name>
<description>JPush for cordova plugin</description>

View File

@ -59,19 +59,19 @@ NSDictionary *_launchOptions;
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[localNotificationEvent toJsonString]];
}
}
[JPUSHService setDebugMode];
NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
NSNumber *delay = [plistData valueForKey:JPushConfig_Delay];
_launchOptions = notification.userInfo;
if (![delay boolValue]) {
[self startJPushSDK];
}
}
[JPUSHService setDebugMode];
NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
NSNumber *delay = [plistData valueForKey:JPushConfig_Delay];
_launchOptions = notification.userInfo;
if (![delay boolValue]) {
[self startJPushSDK];
}
}
-(void)startJPushSDK{
@ -137,14 +137,12 @@ NSDictionary *_launchOptions;
[JPUSHService handleRemoteNotification:userInfo];
NSString *eventName;
switch ([UIApplication sharedApplication].applicationState) {
case UIApplicationStateActive:
eventName = JPushDocumentEvent_ReceiveNotification;
break;
case UIApplicationStateBackground:
eventName = JPushDocumentEvent_BackgroundNotification;
break;
default:
break;
case UIApplicationStateBackground:
eventName = JPushDocumentEvent_BackgroundNotification;
break;
default:
eventName = JPushDocumentEvent_ReceiveNotification;
break;
}
[JPushPlugin fireDocumentEvent:eventName jsString:[[self jpushFormatAPNSDic:userInfo] toJsonString]];