diff --git a/plugin.xml b/plugin.xml index e5a8199..c06f37e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -49,7 +49,7 @@ - + diff --git a/src/ios/lib/JPUSHService.h b/src/ios/lib/JPUSHService.h old mode 100755 new mode 100644 index a222ab6..9b8b203 --- a/src/ios/lib/JPUSHService.h +++ b/src/ios/lib/JPUSHService.h @@ -9,7 +9,7 @@ * Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved. */ -#define JPUSH_VERSION_NUMBER 3.7.4 +#define JPUSH_VERSION_NUMBER 4.6.6 #import @@ -23,12 +23,11 @@ @class UIView; @protocol JPUSHRegisterDelegate; @protocol JPUSHGeofenceDelegate; -@protocol JPushInMessageDelegate; +@protocol JPUSHNotiInMessageDelegate; typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq); typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind); typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq); -typedef void (^JPUSHInMssageCompletion)(NSInteger iResCode); extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中 extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接 @@ -58,17 +57,6 @@ typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) { JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications. }; -typedef NS_ENUM(NSInteger,JPushInMessageContentType){ - JPushAdContentType = 1, //广告类型的inMessage - JPushNotiContentType = 2, //通知类型的inMessage -}; - -typedef NS_OPTIONS(NSUInteger, JPInMessageType) { - JPInMessageTypeBanner = (1 << 0), // 横幅 - JPInMessageTypeModal = (1 << 1), // 模态 - JPInMessageTypeFloat = (1 << 2), // 小浮窗 -}; - /*! * 通知注册实体类 */ @@ -130,6 +118,11 @@ typedef NS_OPTIONS(NSUInteger, JPInMessageType) { @property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。 @property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。 @property (nonatomic, copy) NSString *targetContentIdentifier NS_AVAILABLE_IOS(13.0); // An identifier for the content of the notification used by the system to customize the scene to be activated when tapping on a notification. +//iOS15以上的新增属性 interruptionLevel为枚举UNNotificationInterruptionLevel +// The interruption level determines the degree of interruption associated with the notification +@property (nonatomic, assign) NSUInteger interruptionLevel NS_AVAILABLE_IOS(15.0); +// Relevance score determines the sorting for the notification across app notifications. The expected range is between 0.0f and 1.0f. +@property (nonatomic, assign) double relevanceScore NS_AVAILABLE_IOS(15.0); @end @@ -662,94 +655,14 @@ typedef NS_OPTIONS(NSUInteger, JPInMessageType) { */ + (void)setLocationEanable:(BOOL)isEanble; -/*! -* @abstract 设置应用内消息的代理 -* -* @discussion 遵守JPushInMessageDelegate的代理对象 -* -*/ -+ (void)setInMessageDelegate:(id)inMessageDelegate; /*! -* @abstract 设置应用内消息的inMessageView的父控件 +* @abstract 设置应用内提醒消息的代理 * -* @discussion 建议设置成当前展示的window,SDK默认取当前APP顶层的Window。 +* @discussion 遵守JPushNotiInMessageDelegate的代理对象 * */ -+ (void)setInMessageSuperView:(UIView *)view; - - -/*! -* @abstract 主动拉取应用内消息的接口 -* -* @discussion 拉取结果的回调 -* -*/ -+ (void)pullInMessageCompletion:(JPUSHInMssageCompletion)completion __attribute__((deprecated("JPush 3.7.0 版本已过期"))); - - -/*! -* @abstract 主动拉取应用内消息的接口 -* -* @param types 应用内消息样式 -* -* @discussion 拉取结果的回调 -*/ -+ (void)pullInMessageWithTypes:(NSUInteger)types completion:(JPUSHInMssageCompletion)completion __attribute__((deprecated("JPush 3.7.0 版本已过期"))); - - -/*! -* @abstract 主动拉取应用内消息的接口 -* -* @param adPosition 广告位 -* -* @discussion 拉取结果的回调 -*/ -+ (void)pullInMessageWithAdPosition:(NSString *)adPosition completion:(JPUSHInMssageCompletion)completion; - - -/*! -* @abstract 主动拉取应用内消息的接口 -* -* @param params 拉取条件 可传参数: @"adPosition" -> 广告位 NSString, @"event" -> 事件 NSString -* -* @discussion 拉取结果的回调 -*/ -+ (void)pullInMessageWithParams:(NSDictionary *)params completion:(JPUSHInMssageCompletion)completion; - - -/*! -* @abstract 通过事件触发应用内消息下发 -* -* @param event 事件 -* -*/ -+ (void)triggerInMessageByEvent:(NSString *)event; - - -/*! -* @abstract 在页面切换的时候调用,告诉sdk当前切换到的页面名称 -* -* @param className 当前页面的类名 -* -* @discussion - 通过定向页面触发应用内消息下发的功能、页面跳转到黑名单页面隐藏正在曝光中的inapp的功能、inapp页面延迟展示功能都依赖于该接口调用。 - 请在页面切换的时候调用此方法。确保在所有页面的viewDidAppear中调用此方法。不然可能会造成inapp部分功能不完善。建议在viewController的基类中调用,或者使用method swizzling方法交换viewController的viewDidAppear方法。 -* -*/ -+ (void)currentViewControllerName:(NSString *)className; - - -/*! -* @abstract 通过定向页面触发应用内消息下发 -* -* @param pageName 当前页面的类名 -* -* @discussion 请在页面切换的时候调用此方法。确保在所有页面的viewDidAppear中调用此方法。不然可能会造成该功能不完善。建议在viewController的基类中调用,或者使用method swizzling方法交换viewController的viewDidAppear方法。 -* -*/ -+ (void)triggerInMessageByPageChange:(NSString *)pageName __attribute__((deprecated("JPush 3.7.4 版本已过期"))); - ++ (void)setNotiInMessageDelegate:(id)notiInMessageDelegate; ///---------------------------------------------------- @@ -857,44 +770,25 @@ callbackSelector:(SEL)cbSelector */ - (void)jpushGeofenceIdentifer:(NSString *)geofenceId didExitRegion:(NSDictionary *)userInfo error:(NSError *)error __attribute__((deprecated("JPush 3.6.0 版本已过期"))); - @end -@protocol JPushInMessageDelegate -@optional -/** - *是否允许应用内消息弹出,默认为允许 -*/ -- (BOOL)jPushInMessageIsAllowedInMessagePop; +@protocol JPUSHNotiInMessageDelegate /** - *应用内消息展示的回调 -*/ -- (void)jPushInMessageAlreadyPop __attribute__((deprecated("JPush 3.4.0 版本已过期"))); - -/** - *应用内消息已消失 -*/ -- (void)jPushInMessageAlreadyDisappear; - - -/** - inMessage展示的回调 + 应用内提醒消息展示的回调 - @param messageType inMessage - @param content 下发的数据,广告类的返回数据为空时返回的信息 + @param content 应用内提醒消息的内容 */ -- (void)jPushInMessageAlreadyPopInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content; +- (void)jPushNotiInMessageDidShowWithContent:(NSDictionary *)content; /** - inMessage点击的回调 + 应用内提醒消息点击的回调 - @param messageType inMessage - @param content 下发的数据,广告类的返回数据为空时返回的信息 + @param content 应用内提醒消息的内容 */ -- (void)jpushInMessagedidClickInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content; +- (void)jPushNotiInMessageDidClickWithContent:(NSDictionary *)content; @end diff --git a/src/ios/lib/jpush-ios-3.7.4.a b/src/ios/lib/jpush-ios-4.6.6.a old mode 100755 new mode 100644 similarity index 51% rename from src/ios/lib/jpush-ios-3.7.4.a rename to src/ios/lib/jpush-ios-4.6.6.a index d6b535a..26aa045 Binary files a/src/ios/lib/jpush-ios-3.7.4.a and b/src/ios/lib/jpush-ios-4.6.6.a differ