Skip to content

Commit 3626ef1

Browse files
authored
Merge pull request #600 from jpush/dev
Dev
2 parents 144410c + 1bcd996 commit 3626ef1

File tree

5 files changed

+50
-11
lines changed

5 files changed

+50
-11
lines changed

android/src/main/AndroidManifest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
<!-- User defined. 用户自定义的广播接收器-->
7474
<receiver
7575
android:name="cn.jpush.reactnativejpush.JPushModule$JPushReceiver"
76-
android:enabled="true">
76+
android:enabled="true"
77+
android:exported="false">
7778
<intent-filter>
7879
<action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required 用户注册SDK的intent-->
7980
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required 用户接收SDK消息的intent-->
@@ -85,7 +86,9 @@
8586
</intent-filter>
8687
</receiver>
8788
<!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
88-
<receiver android:name="cn.jpush.reactnativejpush.JPushModule$MyJPushMessageReceiver">
89+
<receiver android:name="cn.jpush.reactnativejpush.JPushModule$MyJPushMessageReceiver"
90+
android:enabled="true"
91+
android:exported="false">
8992
<intent-filter>
9093
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
9194
<category android:name="${applicationId}" />

ios/RCTJPushModule.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
624386D71E096B8800F69E07 /* RCTJPushActionQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 624386D21E096B8800F69E07 /* RCTJPushActionQueue.m */; };
1111
624386D81E096B8800F69E07 /* RCTJPushModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 624386D41E096B8800F69E07 /* RCTJPushModule.m */; };
12-
62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */; };
12+
62DA93BE21E8679300208462 /* libjpush-ios-3.1.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DA93BD21E8679300208462 /* libjpush-ios-3.1.2.a */; };
1313
/* End PBXBuildFile section */
1414

1515
/* Begin PBXCopyFilesBuildPhase section */
@@ -30,16 +30,16 @@
3030
624386D31E096B8800F69E07 /* RCTJPushModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJPushModule.h; sourceTree = "<group>"; };
3131
624386D41E096B8800F69E07 /* RCTJPushModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJPushModule.m; sourceTree = "<group>"; };
3232
6280980A1CEDC407000D3A81 /* libRCTJPushModule.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTJPushModule.a; sourceTree = BUILT_PRODUCTS_DIR; };
33-
62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libjpush-ios-3.1.1.a"; sourceTree = "<group>"; };
34-
62DCABED2182B19C007CBEAE /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = "<group>"; };
33+
62DA93BC21E8679300208462 /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = "<group>"; };
34+
62DA93BD21E8679300208462 /* libjpush-ios-3.1.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libjpush-ios-3.1.2.a"; sourceTree = "<group>"; };
3535
/* End PBXFileReference section */
3636

3737
/* Begin PBXFrameworksBuildPhase section */
3838
628098071CEDC407000D3A81 /* Frameworks */ = {
3939
isa = PBXFrameworksBuildPhase;
4040
buildActionMask = 2147483647;
4141
files = (
42-
62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */,
42+
62DA93BE21E8679300208462 /* libjpush-ios-3.1.2.a in Frameworks */,
4343
);
4444
runOnlyForDeploymentPostprocessing = 0;
4545
};
@@ -65,8 +65,8 @@
6565
6280980C1CEDC407000D3A81 /* RCTJPushModule */ = {
6666
isa = PBXGroup;
6767
children = (
68-
62DCABED2182B19C007CBEAE /* JPUSHService.h */,
69-
62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */,
68+
62DA93BC21E8679300208462 /* JPUSHService.h */,
69+
62DA93BD21E8679300208462 /* libjpush-ios-3.1.2.a */,
7070
624386D11E096B8800F69E07 /* RCTJPushActionQueue.h */,
7171
624386D21E096B8800F69E07 /* RCTJPushActionQueue.m */,
7272
624386D31E096B8800F69E07 /* RCTJPushModule.h */,

ios/RCTJPushModule/JPUSHService.h

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
1010
*/
1111

12-
#define JPUSH_VERSION_NUMBER 3.1.1
12+
#define JPUSH_VERSION_NUMBER 3.1.2
1313

1414
#import <Foundation/Foundation.h>
1515

@@ -21,6 +21,7 @@
2121
@class UNNotificationRequest;
2222
@class UNNotification;
2323
@protocol JPUSHRegisterDelegate;
24+
@protocol JPUSHGeofenceDelegate;
2425

2526
typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
2627
typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
@@ -370,6 +371,19 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
370371
*/
371372
+ (void)setLocation:(CLLocation *)location;
372373

374+
/**
375+
设置地理围栏的最大个数
376+
默认值为 10 ,iOS系统默认地理围栏最大个数为20
377+
@param count 个数 count
378+
*/
379+
+ (void)setGeofenecMaxCount:(NSInteger)count;
380+
/**
381+
注册地理围栏的代理
382+
383+
@param delegate 代理
384+
@param launchOptions app启动完成是收到的字段参数
385+
*/
386+
+ (void)registerLbsGeofenceDelegate:(id<JPUSHGeofenceDelegate>)delegate withLaunchOptions:(NSDictionary *)launchOptions;
373387

374388
///----------------------------------------------------
375389
/// @name Local Notification 本地通知
@@ -636,3 +650,25 @@ callbackSelector:(SEL)cbSelector
636650
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(nullable UNNotification *)notification NS_AVAILABLE_IOS(12.0);
637651

638652
@end
653+
654+
@protocol JPUSHGeofenceDelegate <NSObject>
655+
656+
/**
657+
进入地理围栏区域
658+
659+
@param geofenceId 地理围栏id
660+
@param userInfo 地理围栏触发时返回的信息
661+
@param error 错误信息
662+
*/
663+
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didEnterRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;
664+
665+
/**
666+
离开地理围栏区域
667+
668+
@param geofenceId 地理围栏id
669+
@param userInfo 地理围栏触发时返回的信息
670+
@param error 错误信息
671+
*/
672+
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didExitRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;
673+
674+
@end

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jpush-react-native",
3-
"version": "2.5.0",
3+
"version": "2.5.2",
44
"description": "a jpush plugin for react native application",
55
"main": "index.js",
66
"scripts": {
@@ -24,7 +24,7 @@
2424
},
2525
"homepage": "https://github.com/jpush/jpush-react-native#readme",
2626
"peerDependencies": {
27-
"jcore-react-native": ">= 1.3.0"
27+
"jcore-react-native": ">= 1.3.1"
2828
},
2929
"devDependencies": {
3030
"babel-eslint": "^7.2.3",

0 commit comments

Comments
 (0)