|
9 | 9 | * Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved. |
10 | 10 | */ |
11 | 11 |
|
12 | | -#define JPUSH_VERSION_NUMBER 3.2.6 |
| 12 | +#define JPUSH_VERSION_NUMBER 3.3.3 |
13 | 13 |
|
14 | 14 | #import <Foundation/Foundation.h> |
15 | 15 |
|
@@ -48,6 +48,13 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { |
48 | 48 | JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods. |
49 | 49 | }; |
50 | 50 |
|
| 51 | +typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) { |
| 52 | + JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications. |
| 53 | + JPAuthorizationStatusDenied, // The application is not authorized to post user notifications. |
| 54 | + JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications. |
| 55 | + JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications. |
| 56 | +}; |
| 57 | + |
51 | 58 | /*! |
52 | 59 | * 通知注册实体类 |
53 | 60 | */ |
@@ -212,12 +219,38 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { |
212 | 219 |
|
213 | 220 | + (void)registerDeviceToken:(NSData *)deviceToken; |
214 | 221 |
|
215 | | - |
216 | 222 | /*! |
217 | 223 | * @abstract 处理收到的 APNs 消息 |
218 | 224 | */ |
219 | 225 | + (void)handleRemoteNotification:(NSDictionary *)remoteInfo; |
220 | 226 |
|
| 227 | +/*! |
| 228 | + * @abstract 向极光服务器提交Token |
| 229 | + * |
| 230 | + * @param voipToken 推送使用的Voip Token |
| 231 | + */ |
| 232 | ++ (void)registerVoipToken:(NSData *)voipToken; |
| 233 | + |
| 234 | + |
| 235 | +/*! |
| 236 | + * @abstract 处理收到的 Voip 消息 |
| 237 | + * |
| 238 | + * @param remoteInfo 下发的 Voip 内容 |
| 239 | + */ |
| 240 | ++ (void)handleVoipNotification:(NSDictionary *)remoteInfo; |
| 241 | + |
| 242 | + |
| 243 | +/*! |
| 244 | +* @abstract 检测通知授权状态 |
| 245 | +* @param completion 授权结果通过status值返回,详见JPAuthorizationStatus |
| 246 | +*/ |
| 247 | ++ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion; |
| 248 | + |
| 249 | +/*! |
| 250 | +* @abstract 跳转至系统设置页面,iOS8及以上有效 |
| 251 | +*/ |
| 252 | ++ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0); |
| 253 | + |
221 | 254 | /*! |
222 | 255 | * Tags操作接口 |
223 | 256 | * 支持增加/覆盖/删除/清空/查询操作 |
@@ -600,6 +633,14 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) { |
600 | 633 | */ |
601 | 634 | + (void)setLogOFF; |
602 | 635 |
|
| 636 | +/*! |
| 637 | + * @abstract 设置SDK地理位置权限开关 |
| 638 | + * |
| 639 | + * @discussion 关闭地理位置之后,SDK地理围栏的相关功能将受到影响,默认是开启。 |
| 640 | + * |
| 641 | + */ |
| 642 | ++ (void)setLocationEanable:(BOOL)isEanble; |
| 643 | + |
603 | 644 | ///---------------------------------------------------- |
604 | 645 | ///********************下列方法已过期******************** |
605 | 646 | ///**************请使用新版tag/alias操作接口************** |
@@ -662,6 +703,13 @@ callbackSelector:(SEL)cbSelector |
662 | 703 | */ |
663 | 704 | - (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0); |
664 | 705 |
|
| 706 | +/** |
| 707 | + * 监测通知授权状态返回的结果 |
| 708 | + * @param status 授权通知状态,详见JPAuthorizationStatus |
| 709 | + * @param info 更多信息,预留参数 |
| 710 | + */ |
| 711 | +- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info; |
| 712 | + |
665 | 713 | @end |
666 | 714 |
|
667 | 715 | @protocol JPUSHGeofenceDelegate <NSObject> |
|
0 commit comments