diff --git a/ios/RCTJPushModule.xcodeproj/project.pbxproj b/ios/RCTJPushModule.xcodeproj/project.pbxproj index 24c30fbf..c7a1138a 100644 --- a/ios/RCTJPushModule.xcodeproj/project.pbxproj +++ b/ios/RCTJPushModule.xcodeproj/project.pbxproj @@ -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 */; }; - 6296D38521251A7600E77B5E /* libjpush-ios-3.1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6296D38321251A7600E77B5E /* libjpush-ios-3.1.0.a */; }; + 62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -30,8 +30,8 @@ 624386D31E096B8800F69E07 /* RCTJPushModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJPushModule.h; sourceTree = ""; }; 624386D41E096B8800F69E07 /* RCTJPushModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJPushModule.m; sourceTree = ""; }; 6280980A1CEDC407000D3A81 /* libRCTJPushModule.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTJPushModule.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 6296D38321251A7600E77B5E /* libjpush-ios-3.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libjpush-ios-3.1.0.a"; sourceTree = ""; }; - 6296D38421251A7600E77B5E /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = ""; }; + 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libjpush-ios-3.1.1.a"; sourceTree = ""; }; + 62DCABED2182B19C007CBEAE /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -39,7 +39,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6296D38521251A7600E77B5E /* libjpush-ios-3.1.0.a in Frameworks */, + 62DCABEE2182B19C007CBEAE /* libjpush-ios-3.1.1.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -65,8 +65,8 @@ 6280980C1CEDC407000D3A81 /* RCTJPushModule */ = { isa = PBXGroup; children = ( - 6296D38421251A7600E77B5E /* JPUSHService.h */, - 6296D38321251A7600E77B5E /* libjpush-ios-3.1.0.a */, + 62DCABED2182B19C007CBEAE /* JPUSHService.h */, + 62DCABEC2182B19C007CBEAE /* libjpush-ios-3.1.1.a */, 624386D11E096B8800F69E07 /* RCTJPushActionQueue.h */, 624386D21E096B8800F69E07 /* RCTJPushActionQueue.m */, 624386D31E096B8800F69E07 /* RCTJPushModule.h */, diff --git a/ios/RCTJPushModule/JPUSHService.h b/ios/RCTJPushModule/JPUSHService.h index 6ca54112..3f3f843f 100755 --- a/ios/RCTJPushModule/JPUSHService.h +++ b/ios/RCTJPushModule/JPUSHService.h @@ -9,7 +9,7 @@ * Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved. */ -#define JPUSH_VERSION_NUMBER 3.1.0 +#define JPUSH_VERSION_NUMBER 3.1.1 #import @@ -40,6 +40,11 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received + JPAuthorizationOptionCarPlay = (1 << 3), // The ability to display notifications in a CarPlay environment. + JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts. + JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings. + JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center. + }; /*! @@ -72,6 +77,17 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { @end +/*! + * 推送通知声音实体类 + * iOS10以上有效 + */ +@interface JPushNotificationSound : NSObject +@property (nonatomic, copy) NSString *soundName; //普通通知铃声 +@property (nonatomic, copy) NSString *criticalSoundName NS_AVAILABLE_IOS(12.0); //警告通知铃声 +@property (nonatomic, assign) float criticalSoundVolume NS_AVAILABLE_IOS(12.0); //警告通知铃声音量,有效值在0~1之间,默认为1 +@end + + /*! * 推送内容实体类 */ @@ -85,12 +101,16 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { @property (nonatomic, copy) NSString *categoryIdentifier; // 行为分类标识 @property (nonatomic, copy) NSDictionary *userInfo; // 本地推送时可以设置userInfo来增加附加信息,远程推送时设置的payload推送内容作为此userInfo @property (nonatomic, copy) NSString *sound; // 声音名称,不设置则为默认声音 +@property (nonatomic, copy) JPushNotificationSound *soundSetting NS_AVAILABLE_IOS(10.0); //推送声音实体 @property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 附件,iOS10以上有效,需要传入UNNotificationAttachment对象数组类型 @property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 线程或与推送请求相关对话的标识,iOS10以上有效,可用来对推送进行分组 @property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名,iOS10以上有效,从推送启动时将会用到 +@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。 +@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。 @end + /*! * 推送触发方式实体类 * 注:dateComponents、timeInterval、region在iOS10以上可选择其中一个参数传入有效值,如果同时传入值会根据优先级I、II、III使其中一种触发方式生效,fireDate为iOS10以下根据时间触发时须传入的参数 @@ -608,4 +628,11 @@ callbackSelector:(SEL)cbSelector */ - (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler; +/* + * @brief handle UserNotifications.framework [openSettingsForNotification:] + * @param center [UNUserNotificationCenter currentNotificationCenter] 新特性用户通知中心 + * @param notification 当前管理的通知对象 + */ +- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(nullable UNNotification *)notification NS_AVAILABLE_IOS(12.0); + @end diff --git a/ios/RCTJPushModule/libjpush-ios-3.1.0.a b/ios/RCTJPushModule/libjpush-ios-3.1.1.a similarity index 58% rename from ios/RCTJPushModule/libjpush-ios-3.1.0.a rename to ios/RCTJPushModule/libjpush-ios-3.1.1.a index e3a90f65..80518b61 100755 Binary files a/ios/RCTJPushModule/libjpush-ios-3.1.0.a and b/ios/RCTJPushModule/libjpush-ios-3.1.1.a differ diff --git a/package.json b/package.json index 244fdf34..5e6f4f39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jpush-react-native", - "version": "2.2.12", + "version": "2.2.13", "description": "a jpush plugin for react native application", "main": "index.js", "scripts": {