File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments