Compare commits

...

22 Commits

Author SHA1 Message Date
Hevin
031acb9631 Merge branch 'dev' 2017-10-13 13:11:12 +08:00
Hevin
0ee5f8b1a0 Update iOS SDK to v3.0.7 2017-10-13 13:10:47 +08:00
Hevin
259ec0a03a Update API doc 2017-10-13 13:09:19 +08:00
Hevin
6283cb26f6 Remove deprecated method
setTagsWithAlias
2017-10-13 10:12:16 +08:00
Hevin
8d098d29b1 Merge branch 'dev' 2017-10-11 14:49:23 +08:00
huangminlinux
a9343ac776 Merge pull request #278 from jpush/dev
fix open local notification to launch app event bug
2017-10-11 01:43:19 -05:00
huangminlinux
de58071773 Merge pull request #277 from jpush/dev
remove jpush.startLocalNotification event in iOS docs
2017-10-10 22:30:56 -05:00
huangminlinux
13341fd68a Merge pull request #276 from jpush/dev
Dev
2017-10-10 22:28:05 -05:00
Hevin
edf29bbc8d Merge branch 'dev' 2017-09-28 10:25:03 +08:00
Hevin
ae54960da4 Merge branch 'dev' 2017-09-26 18:28:44 +08:00
Hevin
ea6011635f Merge branch 'dev' 2017-09-25 12:32:36 +08:00
Hevin
0829104534 Merge branch 'dev' 2017-09-23 09:11:34 +08:00
Hevin
592d5a5fb9 Merge branch 'dev' 2017-09-22 21:16:11 +08:00
Hevin
4753174bda Merge branch 'dev' 2017-09-22 20:24:21 +08:00
Hevin
3f077e32fd Merge branch 'dev' 2017-09-19 14:33:24 +08:00
Hevin
5c569d00da Merge branch 'dev' 2017-09-08 14:32:18 +08:00
Hevin
c5f7963425 Merge branch 'dev' 2017-07-21 14:15:57 +08:00
Hevin
a4eaf51455 Merge branch 'dev' 2017-07-21 14:00:30 +08:00
Hevin
04fae7d538 Merge branch 'dev' 2017-07-12 10:16:49 +08:00
Hevin
8e087e102a Merge branch 'dev' 2017-07-07 11:26:20 +08:00
Hevin
35c09c0c92 Merge branch 'dev' 2017-07-04 17:51:51 +08:00
Hevin
f0a87962e7 Merge branch 'dev' 2017-06-30 15:44:35 +08:00
10 changed files with 6 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
# JPush PhoneGap / Cordova Plugin
[![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin)
[![release](https://img.shields.io/badge/release-3.2.7-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
[![release](https://img.shields.io/badge/release-3.2.8-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin)
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)

View File

@@ -716,10 +716,6 @@ window.JPush.getUserNotificationSettings(callback)
[iOS 7 以后后台收到远程通知](#后台收到推送)
### jpush.setTagsWithAlias
[设置标签别名回调](#返回值说明)
### jpush.receiveMessage
[获取自定义消息内容](#获取自定义消息内容)

View File

@@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.2.7",
"version": "3.2.8",
"description": "JPush for cordova plugin",
"cordova": {
"id": "jpush-phonegap-plugin",

View File

@@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jpush-phonegap-plugin"
version="3.2.7">
version="3.2.8">
<name>JPush</name>
<description>JPush for cordova plugin</description>
@@ -38,7 +38,7 @@
<source-file src="src/ios/Plugins/AppDelegate+JPush.m" />
<header-file src="src/ios/lib/JPUSHService.h" />
<source-file src="src/ios/lib/jpush-ios-3.0.6.a" framework="true" />
<source-file src="src/ios/lib/jpush-ios-3.0.7.a" framework="true" />
<resource-file src="src/ios/JPushConfig.plist" />
<framework src="CFNetwork.framework" weak="true" />

View File

@@ -527,24 +527,6 @@ public class JPushPlugin extends CordovaPlugin {
eventCallbackMap.put(sequence, callbackContext);
}
void setTagsWithAlias(JSONArray data, CallbackContext callbackContext) {
HashSet<String> tags = new HashSet<String>();
String alias;
try {
alias = data.getString(0);
JSONArray tagsArray = data.getJSONArray(1);
for (int i = 0; i < tagsArray.length(); i++) {
tags.add(tagsArray.getString(i));
}
JPushInterface.setAliasAndTags(mContext,
alias, tags, mTagWithAliasCallback);
callbackContext.success();
} catch (JSONException e) {
e.printStackTrace();
callbackContext.error("Error reading tagAlias JSON");
}
}
void getConnectionState(JSONArray data, CallbackContext callback) {
boolean isConnected = JPushInterface.getConnectionState(cordovaActivity.getApplicationContext());
callback.success(String.valueOf(isConnected));
@@ -553,8 +535,7 @@ public class JPushPlugin extends CordovaPlugin {
/**
* 自定义通知行为,声音、震动、呼吸灯等。
*/
void setBasicPushNotificationBuilder(JSONArray data,
CallbackContext callbackContext) {
void setBasicPushNotificationBuilder(JSONArray data, CallbackContext callbackContext) {
BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(
this.cordova.getActivity());
builder.developerArg0 = "Basic builder 1";

View File

@@ -17,8 +17,6 @@
//以下为js中可调用接口
//设置标签、别名
-(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command;
-(void)setTags:(CDVInvokedUrlCommand*)command;
-(void)addTags:(CDVInvokedUrlCommand*)command;
-(void)deleteTags:(CDVInvokedUrlCommand*)command;
@@ -76,7 +74,6 @@
/*
* 以下为js中可监听到的事件
* jpush.openNotification 点击推送消息启动或唤醒app
* jpush.setTagsWithAlias 设置标签、别名完成
* jpush.receiveMessage 收到自定义消息
* jpush.receiveNotification 前台收到推送
* jpush.backgroundNotification 后台收到推送

View File

@@ -87,23 +87,6 @@
});
}
-(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command{
NSString *alias = [command argumentAtIndex:0];
NSArray *tags = [command argumentAtIndex:1];
[JPUSHService setTags:[NSSet setWithArray:tags]
alias:alias
fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
CDVPluginResult *result;
if (iResCode == 0) {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
}
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}];
}
-(void)setTags:(CDVInvokedUrlCommand*)command {
NSDictionary* params = [command.arguments objectAtIndex:0];
NSNumber* sequence = params[@"sequence"];

View File

@@ -9,7 +9,7 @@
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/
#define JPUSH_VERSION_NUMBER 3.0.6
#define JPUSH_VERSION_NUMBER 3.0.7
#import <Foundation/Foundation.h>

View File

@@ -70,20 +70,6 @@ JPushPlugin.prototype.clearLocalNotifications = function () {
}
}
JPushPlugin.prototype.setTagsWithAlias = function (tags, alias, successCallback, errorCallback) {
if (tags == null) {
this.setAlias(alias)
return
}
if (alias == null) {
this.setTags(tags)
return
}
var arrayTagWithAlias = [tags]
arrayTagWithAlias.unshift(alias)
this.callNative('setTagsWithAlias', arrayTagWithAlias, successCallback, errorCallback)
}
/**
* 设置标签。
* 注意:该接口是覆盖逻辑,而不是增量逻辑。即新的调用会覆盖之前的设置。