diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 8c593be..5a7cfca 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -338,7 +338,7 @@ "languageVersion": "2.1" } ], - "generated": "2021-01-06T06:14:07.674626Z", + "generated": "2021-01-26T08:47:21.076726Z", "generator": "pub", "generatorVersion": "2.10.4" } diff --git a/.packages b/.packages index 8fc5a05..ea44336 100644 --- a/.packages +++ b/.packages @@ -1,4 +1,4 @@ -# Generated by pub on 2021-01-06 14:14:07.647799. +# Generated by pub on 2021-01-26 16:47:21.044882. analyzer:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.37.0/lib/ args:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2/lib/ async:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.3.0/lib/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fdb4b5..0e1a80a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.6.3 ++ 修复:Android端获取RegistrationID偶现奔溃问题 ## 0.6.2 + 同步更最新版本SDK ## 0.6.1 diff --git a/README.md b/README.md index 979face..18a6641 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ dependencies: // pub 集成 dependencies: - jpush_flutter: 0.6.2 + jpush_flutter: 0.6.3 ``` ### 配置 diff --git a/android/src/main/java/com/jiguang/jpush/JPushPlugin.java b/android/src/main/java/com/jiguang/jpush/JPushPlugin.java index 895d98f..2b6f4d3 100644 --- a/android/src/main/java/com/jiguang/jpush/JPushPlugin.java +++ b/android/src/main/java/com/jiguang/jpush/JPushPlugin.java @@ -285,6 +285,11 @@ public class JPushPlugin implements MethodCallHandler { public void getRegistrationID(MethodCall call, Result result) { Log.d(TAG,"getRegistrationID: "); + if (registrar == null || registrar.context() == null) { + Log.d(TAG,"register context is nil."); + return; + } + String rid = JPushInterface.getRegistrationID(registrar.context()); if (rid == null || rid.isEmpty()) { getRidCache.add(result); diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 8ca49b9..89f444b 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"android":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jpush_flutter","dependencies":[]}],"date_created":"2021-01-06 14:51:34.996891","version":"1.22.5"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"android":[{"name":"jpush_flutter","path":"/Users/raoxudong/JPush/jpush-github/jpush-flutter-plugin/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jpush_flutter","dependencies":[]}],"date_created":"2021-01-26 16:47:22.148262","version":"1.22.5"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index f50048f..f1fc05a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -164,7 +164,7 @@ packages: path: ".." relative: true source: path - version: "0.6.2" + version: "0.6.3" js: dependency: transitive description: diff --git a/ios/jpush_flutter.podspec b/ios/jpush_flutter.podspec index a7c3f11..73cf84d 100644 --- a/ios/jpush_flutter.podspec +++ b/ios/jpush_flutter.podspec @@ -15,7 +15,8 @@ A new flutter plugin project. s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency 'JPush' + s.dependency 'JCore','2.4.0' + s.dependency 'JPush','3.4.0' s.ios.deployment_target = '8.0' s.static_framework = true diff --git a/pubspec.yaml b/pubspec.yaml index 0cbe31e..f896a89 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: jpush_flutter description: JIGUANG officially supported JPush Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)(https://www.jiguang.cn). -version: 0.6.2 +version: 0.6.3 # author: xudong.rao homepage: https://www.jiguang.cn