Merge pull request #66 from raoxudong/dev

修复sendLocalNotification crash 问题,修复 iOS 启动角标自动消失,更新 配置
master
raoxudong 5 years ago committed by GitHub
commit 507e876e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,56 +1,56 @@
# Generated by pub on 2019-07-24 14:38:49.565093. # Generated by pub on 2019-08-23 15:35:48.440553.
analyzer:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.37.0/lib/ analyzer:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.37.0/lib/
args:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2/lib/ args:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2/lib/
async:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/async-2.3.0/lib/ async:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.3.0/lib/
boolean_selector:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5/lib/ boolean_selector:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5/lib/
charcode:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib/ charcode:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib/
collection:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib/ collection:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib/
convert:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/ convert:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
crypto:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib/ crypto:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib/
csslib:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.1/lib/ csslib:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.1/lib/
flutter:file:///Users/shikk/Documents/flutter/packages/flutter/lib/ flutter:file:///Applications/flutter/packages/flutter/lib/
front_end:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.20/lib/ front_end:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.20/lib/
glob:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.7/lib/ glob:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.7/lib/
html:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+2/lib/ html:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+2/lib/
http:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.0+2/lib/ http:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.0+2/lib/
http_multi_server:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.1.0/lib/ http_multi_server:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.1.0/lib/
http_parser:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib/ http_parser:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib/
io:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.3/lib/ io:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.3/lib/
js:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib/ js:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib/
kernel:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.20/lib/ kernel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.20/lib/
matcher:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib/ matcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib/
meta:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib/ meta:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib/
mime:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/ mime:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/
mockito:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/mockito-3.0.2/lib/ mockito:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/mockito-3.0.2/lib/
multi_server_socket:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.2/lib/ multi_server_socket:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.2/lib/
node_preamble:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.5/lib/ node_preamble:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.5/lib/
package_config:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.5/lib/ package_config:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.5/lib/
package_resolver:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.10/lib/ package_resolver:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.10/lib/
path:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib/ path:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib/
pedantic:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1/lib/ pedantic:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1/lib/
platform:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.0/lib/ platform:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.0/lib/
pool:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0/lib/ pool:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0/lib/
pub_semver:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib/ pub_semver:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib/
shelf:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.5/lib/ shelf:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.5/lib/
shelf_packages_handler:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.4/lib/ shelf_packages_handler:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.4/lib/
shelf_static:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.8/lib/ shelf_static:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.8/lib/
shelf_web_socket:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3/lib/ shelf_web_socket:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3/lib/
sky_engine:file:///Users/shikk/Documents/flutter/bin/cache/pkg/sky_engine/lib/ sky_engine:file:///Applications/flutter/bin/cache/pkg/sky_engine/lib/
source_map_stack_trace:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.5/lib/ source_map_stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.5/lib/
source_maps:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.8/lib/ source_maps:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.8/lib/
source_span:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib/ source_span:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib/
stack_trace:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/ stack_trace:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
stream_channel:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/ stream_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
stream_transform:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-0.0.19/lib/ stream_transform:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-0.0.19/lib/
string_scanner:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib/ string_scanner:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib/
term_glyph:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/ term_glyph:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
test:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/test-1.6.5/lib/ test:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test-1.6.5/lib/
test_api:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.6/lib/ test_api:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.6/lib/
test_core:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/test_core-0.2.7/lib/ test_core:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_core-0.2.7/lib/
typed_data:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/ typed_data:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
vector_math:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/ vector_math:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/
vm_service_lib:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/vm_service_lib-3.22.2/lib/ vm_service_lib:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_lib-3.22.2/lib/
watcher:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+12/lib/ watcher:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+12/lib/
web_socket_channel:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.14/lib/ web_socket_channel:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.14/lib/
yaml:file:///Users/shikk/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.16/lib/ yaml:file:///Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.16/lib/
jpush_flutter:lib/ jpush_flutter:lib/

@ -1,3 +1,9 @@
## 0.1.0
+ 修复:调用 sendLocalNotification 接口 crash 问题;
+ 修复iOS 启动 APP 角标自动消失问题;
+ 修复执行 flutter build apk 打包错误问题;
+ 更新配置
## 0.0.13 ## 0.0.13
featurn: featurn:

@ -7,7 +7,7 @@
```yaml ```yaml
dependencies: dependencies:
jpush_flutter: 0.0.13 jpush_flutter: 0.1.0
``` ```
### 配置 ### 配置

@ -22,7 +22,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 27 compileSdkVersion 28
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
@ -36,7 +36,7 @@ android {
dependencies { dependencies {
implementation 'cn.jiguang.sdk:jpush:3.3.4' implementation 'cn.jiguang.sdk:jpush:3.3.4'
implementation 'cn.jiguang.sdk:jcore:2.1.2' implementation 'cn.jiguang.sdk:jcore:2.1.2'
implementation 'com.android.support:appcompat-v7:27.+' // implementation 'com.android.support:appcompat-v7:28.+'
compileOnly files('libs/flutter.jar') compileOnly files('libs/flutter.jar')
} }

@ -24,8 +24,12 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion 27 compileSdkVersion 28
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
} }
@ -37,7 +41,7 @@ android {
applicationId "com.shikk.testJpush" //JPush . applicationId "com.shikk.testJpush" //JPush .
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 27 targetSdkVersion 28
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@ -56,14 +60,23 @@ android {
JPUSH_CHANNEL : "developer-default", //. JPUSH_CHANNEL : "developer-default", //.
] ]
} }
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug signingConfig signingConfigs.release
} }
} }
buildToolsVersion '28.0.2' // buildToolsVersion '28.0.1'
packagingOptions { packagingOptions {
exclude 'lib/arm64-v8a/libgojni.so' exclude 'lib/arm64-v8a/libgojni.so'

@ -5,7 +5,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.android.tools.build:gradle:3.1.2'
} }
} }

@ -1,6 +1,6 @@
#Wed Oct 10 15:58:24 CST 2018 #Wed Aug 21 15:20:04 CST 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

@ -0,0 +1,4 @@
storePassword=<password from previous step>
keyPassword=<password from previous step>
keyAlias=key
storeFile=<location of the key store file, e.g. /Users/<user name>/key.jks>

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

@ -14,6 +14,7 @@ import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
void main() { void main() {
/*
testWidgets('Verify Platform version', (WidgetTester tester) async { testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame. // Build our app and trigger a frame.
await tester.pumpWidget(new MyApp()); await tester.pumpWidget(new MyApp());
@ -48,6 +49,6 @@ test('requestNotificationPermissions on ios with custom permissions', () {
<String, bool>{'sound': false, 'badge': true, 'alert': true})); <String, bool>{'sound': false, 'badge': true, 'alert': true}));
}); });
*/
} }

@ -326,7 +326,7 @@ static NSMutableArray<FlutterResult>* getRidResults;
content.title = params[@"title"]; content.title = params[@"title"];
} }
if (![params[@"subtitle"] isEqualToString:@"<null>"]) { if (params[@"subtitle"] && ![params[@"subtitle"] isEqualToString:@"<null>"]) {
content.subtitle = params[@"subtitle"]; content.subtitle = params[@"subtitle"];
} }
@ -338,15 +338,15 @@ static NSMutableArray<FlutterResult>* getRidResults;
content.badge = params[@"badge"]; content.badge = params[@"badge"];
} }
if (![params[@"action"] isEqualToString:@"<null>"]) { if (params[@"action"] && ![params[@"action"] isEqualToString:@"<null>"]) {
content.action = params[@"action"]; content.action = params[@"action"];
} }
if (![params[@"extra"] isEqualToString:@"<null>"]) { if ([params[@"extra"] isKindOfClass:[NSDictionary class]]) {
content.userInfo = params[@"extra"]; content.userInfo = params[@"extra"];
} }
if (![params[@"sound"] isEqualToString:@"<null>"]) { if (params[@"sound"] && ![params[@"sound"] isEqualToString:@"<null>"]) {
content.sound = params[@"sound"]; content.sound = params[@"sound"];
} }
@ -424,8 +424,8 @@ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
} }
- (void)applicationDidBecomeActive:(UIApplication *)application { - (void)applicationDidBecomeActive:(UIApplication *)application {
application.applicationIconBadgeNumber = 1; // application.applicationIconBadgeNumber = 1;
application.applicationIconBadgeNumber = 0; // application.applicationIconBadgeNumber = 0;
} }
- (bool)application:(UIApplication *)application - (bool)application:(UIApplication *)application

@ -291,7 +291,7 @@ class LocalNotification {
'badge': badge, 'badge': badge,
'soundName': soundName, 'soundName': soundName,
'subtitle': subtitle 'subtitle': subtitle
}; }..removeWhere((key, value)=>value==null);
} }
} }

@ -1,5 +1,5 @@
# Generated by pub # Generated by pub
# See https://www.dartlang.org/tools/pub/glossary#lockfile # See https://dart.dev/tools/pub/glossary#lockfile
packages: packages:
analyzer: analyzer:
dependency: transitive dependency: transitive

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

Loading…
Cancel
Save