Skip to content

Commit 5f9ae4e

Browse files
committed
updaate to 2.2.8
1 parent 9c4410f commit 5f9ae4e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ios/RCTJPushModule/RCTJPushModule.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,13 @@ - (void)didRegistRemoteNotification:(NSString *)token {
785785
NSLog(@"simulator can not get registrationid");
786786
callback(@[@""]);
787787
#elif TARGET_OS_IPHONE//真机
788+
if ([JPUSHService registrationID] != nil && ![[JPUSHService registrationID] isEqualToString:@""]) {
789+
// 如果已经成功获取 registrationID,从本地获取直接缓存
790+
callback(@[[JPUSHService registrationID]]);
791+
return;
792+
}
793+
794+
// 第一次获取时需要 jpush login 状态
788795
if (_isJPushDidLogin) {
789796
callback(@[[JPUSHService registrationID]]);
790797
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jpush-react-native",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"description": "a jpush plugin for react native application",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)