|
9 | 9 | * Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved. |
10 | 10 | */ |
11 | 11 |
|
12 | | -#define JPUSH_VERSION_NUMBER 4.6.6 |
| 12 | +#define JPUSH_VERSION_NUMBER 4.8.1 |
13 | 13 |
|
14 | 14 | #import <Foundation/Foundation.h> |
15 | 15 |
|
|
28 | 28 | typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq); |
29 | 29 | typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind); |
30 | 30 | typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq); |
| 31 | +typedef void (^JPUSHPropertiesOperationCompletion)(NSInteger iResCode, NSDictionary *properties, NSInteger seq); |
31 | 32 |
|
32 | 33 | extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中 |
33 | 34 | extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接 |
@@ -363,6 +364,49 @@ typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) { |
363 | 364 | */ |
364 | 365 | + (NSSet *)filterValidTags:(NSSet *)tags; |
365 | 366 |
|
| 367 | + |
| 368 | +/*! |
| 369 | + * Property操作接口 |
| 370 | + * 支持增加/删除/清空操作 |
| 371 | + * 详情请参考文档:https://docs.jiguang.cn/jpush/client/iOS/ios_api/) |
| 372 | + */ |
| 373 | + |
| 374 | +/** |
| 375 | + 新增/更新用户属性 |
| 376 | + |
| 377 | + 如果某个用户属性之前已经存在了,则会更新;不存在,则会新增 |
| 378 | + |
| 379 | + @param properties 需要新增或者更新的的用户属性内容,类型为NSDictionary; |
| 380 | + Key 为用户属性名称,类型必须是 NSString 类型;Value为用户属性值,只支持 NSString、NSNumber、NSDate类型,如果属性为BOOL类型,传值时请转成NSNumber类型 |
| 381 | + @param completion 响应回调 |
| 382 | + @param seq 请求序列号 |
| 383 | + */ |
| 384 | ++ (void)setProperties:(NSDictionary *)properties |
| 385 | + completion:(JPUSHPropertiesOperationCompletion)completion |
| 386 | + seq:(NSInteger)seq; |
| 387 | + |
| 388 | + |
| 389 | +/** |
| 390 | + 删除指定属性 |
| 391 | +
|
| 392 | + @param keys 需要删除的属性名称集合 |
| 393 | + @param completion 响应回调 |
| 394 | + @param seq 请求序列号 |
| 395 | + */ |
| 396 | ++ (void)deleteProperties:(NSSet<NSString *> *)keys |
| 397 | + completion:(JPUSHPropertiesOperationCompletion)completion |
| 398 | + seq:(NSInteger)seq; |
| 399 | + |
| 400 | + |
| 401 | +/** |
| 402 | + 清空所有属性 |
| 403 | + @param completion 响应回调 |
| 404 | + @param seq 请求序列号 |
| 405 | + */ |
| 406 | ++ (void)cleanProperties:(JPUSHPropertiesOperationCompletion)completion |
| 407 | + seq:(NSInteger)seq; |
| 408 | + |
| 409 | + |
366 | 410 | ///---------------------------------------------------- |
367 | 411 | /// @name Stats 统计功能 |
368 | 412 | ///---------------------------------------------------- |
|
0 commit comments