add debug mode config update to 0.0.7

master
huangminlinux 6 years ago
parent 260459af08
commit 6114053dac

@ -1,4 +1,4 @@
# Generated by pub on 2018-10-08 23:40:55.475551.
# Generated by pub on 2018-12-18 11:12:10.903707.
analyzer:file:///Applications/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.33.0/lib/
args:file:///Applications/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib/
async:file:///Applications/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib/

@ -34,6 +34,6 @@ android {
}
dependencies {
compile 'cn.jiguang.sdk:jpush:3.1.6' // JPush 3.1.6
compile 'cn.jiguang.sdk:jcore:1.2.5' // JCore 1.2.5
implementation 'cn.jiguang.sdk:jpush:3.1.6' // JPush 3.1.6
implementation 'cn.jiguang.sdk:jcore:1.2.5' // JCore 1.2.5
}

@ -96,8 +96,9 @@ public class JPushPlugin implements MethodCallHandler {
}
public void setup(MethodCall call, Result result) {
JPushInterface.setDebugMode(true); // 设置开启日志,发布时请关闭日志
HashMap<String, Object> map = call.arguments();
boolean debug = (boolean)map.get("debug");
JPushInterface.setDebugMode(debug);
JPushInterface.init(registrar.context()); // 初始化 JPush
JPushPlugin.instance.dartIsReady = true;
@ -227,9 +228,6 @@ public class JPushPlugin implements MethodCallHandler {
}
/**
* ,,广
* :http://docs.jiguang.cn/client/android_api/

@ -8,6 +8,7 @@
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

@ -35,7 +35,8 @@ final JPush jpush = new JPush();
jpush.setup(
appKey: "a1703c14b186a68a66ef86c1",
channel: "theChannel",
production: false
production: false,
// debug: true,
);
jpush.applyPushAuthority(new NotificationSettingsIOS(
sound: false,

@ -136,7 +136,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.5"
version: "0.0.7"
js:
dependency: transitive
description:

@ -150,8 +150,16 @@ static NSMutableArray<FlutterResult>* getRidResults;
}
}
- (void)setup:(FlutterMethodCall*)call result:(FlutterResult)result {
NSDictionary *arguments = call.arguments;
NSNumber *debug = arguments[@"debug"];
if ([debug boolValue]) {
[JPUSHService setDebugMode];
} else {
[JPUSHService setLogOFF];
}
[JPUSHService setupWithOption:_launchNotification
appKey:arguments[@"appKey"]
@ -383,6 +391,8 @@ static NSMutableArray<FlutterResult>* getRidResults;
result(@[@[]]);
}
- (void)dealloc {
_isJPushDidLogin = NO;
[[NSNotificationCenter defaultCenter] removeObserver:self];

@ -29,8 +29,9 @@ class JPush {
String appKey,
String channel,
bool production,
bool debug = false,
}) {
_channel.invokeMethod('setup', { 'appKey': appKey, 'channel': channel, 'production': production });
_channel.invokeMethod('setup', { 'appKey': appKey, 'channel': channel, 'production': production, 'debug': debug});
}
///
/// JPush ()
@ -154,6 +155,10 @@ class JPush {
return result;
}
void setDebugMode() {
_channel.invokeMethod('setDebugMode');
}
///
/// iOS Only
/// Badge

@ -1,6 +1,6 @@
name: jpush_flutter
description: Offically supported JPush Flutter plugin.
version: 0.0.6
version: 0.0.7
author: huminios <h380108184@gmail.com>
homepage: https://www.jiguang.cn

Loading…
Cancel
Save