Skip to content

Commit 3efcdb3

Browse files
Merge pull request #556 from jpush/dev
Dev
2 parents d35f59a + a5aea8e commit 3efcdb3

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

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-
6296D38521251A7600E77B5E /* libjpush-ios-3.1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6296D38321251A7600E77B5E /* libjpush-ios-3.1.0.a */; };
12+
62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.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-
6296D38321251A7600E77B5E /* libjpush-ios-3.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libjpush-ios-3.1.0.a"; sourceTree = "<group>"; };
34-
6296D38421251A7600E77B5E /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = "<group>"; };
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>"; };
3535
/* End PBXFileReference section */
3636

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

ios/RCTJPushModule/JPUSHService.h

Lines changed: 28 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.0
12+
#define JPUSH_VERSION_NUMBER 3.1.1
1313

1414
#import <Foundation/Foundation.h>
1515

@@ -40,6 +40,11 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
4040
JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received
4141
JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received
4242
JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received
43+
JPAuthorizationOptionCarPlay = (1 << 3), // The ability to display notifications in a CarPlay environment.
44+
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
45+
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
46+
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.
47+
4348
};
4449

4550
/*!
@@ -72,6 +77,17 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
7277

7378
@end
7479

80+
/*!
81+
* 推送通知声音实体类
82+
* iOS10以上有效
83+
*/
84+
@interface JPushNotificationSound : NSObject <NSCopying, NSCoding>
85+
@property (nonatomic, copy) NSString *soundName; //普通通知铃声
86+
@property (nonatomic, copy) NSString *criticalSoundName NS_AVAILABLE_IOS(12.0); //警告通知铃声
87+
@property (nonatomic, assign) float criticalSoundVolume NS_AVAILABLE_IOS(12.0); //警告通知铃声音量,有效值在0~1之间,默认为1
88+
@end
89+
90+
7591
/*!
7692
* 推送内容实体类
7793
*/
@@ -85,12 +101,16 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
85101
@property (nonatomic, copy) NSString *categoryIdentifier; // 行为分类标识
86102
@property (nonatomic, copy) NSDictionary *userInfo; // 本地推送时可以设置userInfo来增加附加信息,远程推送时设置的payload推送内容作为此userInfo
87103
@property (nonatomic, copy) NSString *sound; // 声音名称,不设置则为默认声音
104+
@property (nonatomic, copy) JPushNotificationSound *soundSetting NS_AVAILABLE_IOS(10.0); //推送声音实体
88105
@property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 附件,iOS10以上有效,需要传入UNNotificationAttachment对象数组类型
89106
@property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 线程或与推送请求相关对话的标识,iOS10以上有效,可用来对推送进行分组
90107
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名,iOS10以上有效,从推送启动时将会用到
108+
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
109+
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
91110

92111
@end
93112

113+
94114
/*!
95115
* 推送触发方式实体类
96116
* 注:dateComponents、timeInterval、region在iOS10以上可选择其中一个参数传入有效值,如果同时传入值会根据优先级I、II、III使其中一种触发方式生效,fireDate为iOS10以下根据时间触发时须传入的参数
@@ -608,4 +628,11 @@ callbackSelector:(SEL)cbSelector
608628
*/
609629
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler;
610630

631+
/*
632+
* @brief handle UserNotifications.framework [openSettingsForNotification:]
633+
* @param center [UNUserNotificationCenter currentNotificationCenter] 新特性用户通知中心
634+
* @param notification 当前管理的通知对象
635+
*/
636+
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(nullable UNNotification *)notification NS_AVAILABLE_IOS(12.0);
637+
611638
@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.2.12",
3+
"version": "2.2.13",
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.2.10"
27+
"jcore-react-native": ">= 1.2.11"
2828
},
2929
"devDependencies": {
3030
"babel-eslint": "^7.2.3",

0 commit comments

Comments
 (0)