Skip to content

Commit 3faac19

Browse files
authored
Merge pull request #449 from huangshuni/master
3.8.6
2 parents 6932b84 + 145b75d commit 3faac19

File tree

4 files changed

+48
-4
lines changed

4 files changed

+48
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jpush-phonegap-plugin",
3-
"version": "3.8.5",
3+
"version": "3.8.6",
44
"description": "JPush for cordova plugin",
55
"cordova": {
66
"id": "jpush-phonegap-plugin",

plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="jpush-phonegap-plugin"
5-
version="3.8.5">
5+
version="3.8.6">
66

77
<name>JPush</name>
88
<description>JPush for cordova plugin</description>
@@ -49,7 +49,7 @@
4949
<source-file src="src/ios/Plugins/AppDelegate+JPush.m" />
5050

5151
<header-file src="src/ios/lib/JPUSHService.h" />
52-
<source-file src="src/ios/lib/jpush-ios-4.6.6.a" framework="true" />
52+
<source-file src="src/ios/lib/jpush-ios-4.8.1.a" framework="true" />
5353
<resource-file src="src/ios/JPushConfig.plist" />
5454

5555
<framework src="CFNetwork.framework" weak="true" />

src/ios/lib/JPUSHService.h

Lines changed: 45 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 4.6.6
12+
#define JPUSH_VERSION_NUMBER 4.8.1
1313

1414
#import <Foundation/Foundation.h>
1515

@@ -28,6 +28,7 @@
2828
typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
2929
typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
3030
typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq);
31+
typedef void (^JPUSHPropertiesOperationCompletion)(NSInteger iResCode, NSDictionary *properties, NSInteger seq);
3132

3233
extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中
3334
extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接
@@ -363,6 +364,49 @@ typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
363364
*/
364365
+ (NSSet *)filterValidTags:(NSSet *)tags;
365366

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+
366410
///----------------------------------------------------
367411
/// @name Stats 统计功能
368412
///----------------------------------------------------
Binary file not shown.

0 commit comments

Comments
 (0)