From 14a40c657213c2a3270ef5b00d649892063119b5 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Wed, 25 Oct 2017 10:49:58 +0800 Subject: [PATCH 1/3] adjust ios registerNotification event --- src/ios/Plugins/AppDelegate+JPush.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index b441a6d..efc08fa 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -35,7 +35,7 @@ NSDictionary *_launchOptions; _jpushEventCache = @{}.mutableCopy; } - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jpushSDKDidLoginNotification) name:kJPFNetworkDidLoginNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jpushSDKDidLoginNotification) name:kJPFNetworkDidRegisterNotification object:nil]; if (notification) { if (notification.userInfo) { From 184ee01d1db9022bce4564e9b368bc9d47849cd8 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Wed, 25 Oct 2017 11:09:46 +0800 Subject: [PATCH 2/3] update registrationId evet --- src/ios/Plugins/AppDelegate+JPush.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index efc08fa..301638e 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -35,7 +35,10 @@ NSDictionary *_launchOptions; _jpushEventCache = @{}.mutableCopy; } - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jpushSDKDidLoginNotification) name:kJPFNetworkDidRegisterNotification object:nil]; + [JPUSHService registrationIDCompletionHandler:^(int resCode, NSString *registrationID) { + NSDictionary *event = @{@"registrationId": registrationID?:@""}; + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_receiveRegistrationId jsString:[event toJsonString]]; + }]; if (notification) { if (notification.userInfo) { From fbd9d63590cce3f49383a94e52553fbf0cf39c88 Mon Sep 17 00:00:00 2001 From: Hevin Date: Wed, 25 Oct 2017 11:19:14 +0800 Subject: [PATCH 3/3] build: v3.2.11 --- README.md | 2 +- package.json | 2 +- plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d567166..4a0ffda 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # JPush PhoneGap / Cordova Plugin [![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin) -[![release](https://img.shields.io/badge/release-3.2.10-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases) +[![release](https://img.shields.io/badge/release-3.2.11-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases) [![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin) [![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1) diff --git a/package.json b/package.json index 08478d3..cc19559 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jpush-phonegap-plugin", - "version": "3.2.10", + "version": "3.2.11", "description": "JPush for cordova plugin", "cordova": { "id": "jpush-phonegap-plugin", diff --git a/plugin.xml b/plugin.xml index d0d483d..692b275 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="3.2.11"> JPush JPush for cordova plugin