Skip to content

Commit

Permalink
Merge pull request #600 from jpush/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JoshLipan authored Feb 27, 2019
2 parents 144410c + 1bcd996 commit 3626ef1
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 11 deletions.
7 changes: 5 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
<!-- User defined. 用户自定义的广播接收器-->
<receiver
android:name="cn.jpush.reactnativejpush.JPushModule$JPushReceiver"
android:enabled="true">
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required 用户注册SDK的intent-->
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required 用户接收SDK消息的intent-->
Expand All @@ -85,7 +86,9 @@
</intent-filter>
</receiver>
<!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
<receiver android:name="cn.jpush.reactnativejpush.JPushModule$MyJPushMessageReceiver">
<receiver android:name="cn.jpush.reactnativejpush.JPushModule$MyJPushMessageReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="${applicationId}" />
Expand Down
12 changes: 6 additions & 6 deletions ios/RCTJPushModule.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Begin PBXBuildFile section */
624386D71E096B8800F69E07 /* RCTJPushActionQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 624386D21E096B8800F69E07 /* RCTJPushActionQueue.m */; };
624386D81E096B8800F69E07 /* RCTJPushModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 624386D41E096B8800F69E07 /* RCTJPushModule.m */; };
62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */; };
62DA93BE21E8679300208462 /* libjpush-ios-3.1.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DA93BD21E8679300208462 /* libjpush-ios-3.1.2.a */; };
/* End PBXBuildFile section */

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

/* Begin PBXFrameworksBuildPhase section */
628098071CEDC407000D3A81 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */,
62DA93BE21E8679300208462 /* libjpush-ios-3.1.2.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -65,8 +65,8 @@
6280980C1CEDC407000D3A81 /* RCTJPushModule */ = {
isa = PBXGroup;
children = (
62DCABED2182B19C007CBEAE /* JPUSHService.h */,
62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */,
62DA93BC21E8679300208462 /* JPUSHService.h */,
62DA93BD21E8679300208462 /* libjpush-ios-3.1.2.a */,
624386D11E096B8800F69E07 /* RCTJPushActionQueue.h */,
624386D21E096B8800F69E07 /* RCTJPushActionQueue.m */,
624386D31E096B8800F69E07 /* RCTJPushModule.h */,
Expand Down
38 changes: 37 additions & 1 deletion ios/RCTJPushModule/JPUSHService.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/

#define JPUSH_VERSION_NUMBER 3.1.1
#define JPUSH_VERSION_NUMBER 3.1.2

#import <Foundation/Foundation.h>

Expand All @@ -21,6 +21,7 @@
@class UNNotificationRequest;
@class UNNotification;
@protocol JPUSHRegisterDelegate;
@protocol JPUSHGeofenceDelegate;

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

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

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

@end

@protocol JPUSHGeofenceDelegate <NSObject>

/**
进入地理围栏区域
@param geofenceId 地理围栏id
@param userInfo 地理围栏触发时返回的信息
@param error 错误信息
*/
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didEnterRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;

/**
离开地理围栏区域
@param geofenceId 地理围栏id
@param userInfo 地理围栏触发时返回的信息
@param error 错误信息
*/
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didExitRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;

@end
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jpush-react-native",
"version": "2.5.0",
"version": "2.5.2",
"description": "a jpush plugin for react native application",
"main": "index.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
},
"homepage": "https://github.com/jpush/jpush-react-native#readme",
"peerDependencies": {
"jcore-react-native": ">= 1.3.0"
"jcore-react-native": ">= 1.3.1"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
Expand Down

0 comments on commit 3626ef1

Please sign in to comment.