diff --git a/example/index.html b/example/index.html
index cca460c..fdebf06 100644
--- a/example/index.html
+++ b/example/index.html
@@ -87,9 +87,21 @@
try{
var tag1 = $("#tagText1").attr("value");
- console.log("tag1:"+tag1);
+ var tag2 = $("#tagText2").attr("value");
+ var tag3 = $("#tagText3").attr("value");
- window.plugins.jPushPlugin.setTagsWithAlias("myTags","myTags1","myTags2","myAlias");
+ var alias = $("#aliasText").attr("value");
+
+ console.log("tag1:"+tag1==null);
+ console.log("tag1:"+tag2==null);
+ console.log("tag1:"+tag3==null);
+ var dd = [];
+ dd[0]=tag1
+ dd[1]=tag2
+ dd[2]=tag3
+
+ console.log("dd:"+dd);
+ window.plugins.jPushPlugin.setTagsWithAlias(dd,alias);
}
catch(exception){
console.log(exception);
diff --git a/src/ios/Plugins/JPushPlugin.m b/src/ios/Plugins/JPushPlugin.m
index 5adb43a..38b2e8c 100644
--- a/src/ios/Plugins/JPushPlugin.m
+++ b/src/ios/Plugins/JPushPlugin.m
@@ -19,11 +19,11 @@
[self writeJavascript:[NSString stringWithFormat:@"window.plugins.jPushPlugin.pushCallback('%@')",@""]];
return ;
}
- NSString *tags=[arguments objectAtIndex:0];
- NSString *alias=[arguments objectAtIndex:1];
- NSArray *arrayTags=[tags componentsSeparatedByString:@","];
+ NSString *alias=[arguments objectAtIndex:0];
+ NSArray *arrayTags=[arguments objectAtIndex:1];
// NSArray *tags=[arguments subarrayWithRange:range];
- [APService setTags:[NSSet setWithArray:arrayTags]
+ NSSet* set=[NSSet setWithArray:arrayTags];
+ [APService setTags:set
alias:alias
callbackSelector:@selector(tagsWithAliasCallback:tags:alias:)
object:self];
diff --git a/www/JPushPlugin.js b/www/JPushPlugin.js
index 72f4219..31c7b07 100644
--- a/www/JPushPlugin.js
+++ b/www/JPushPlugin.js
@@ -93,7 +93,7 @@ JPushPlugin.prototype.setTags = function (data) {
this.call_native("setTags", [data]);
}
catch(exception){
- alert(exception);
+ console.log(exception);
}
}
JPushPlugin.prototype.setAlias = function (data) {
@@ -104,7 +104,7 @@ JPushPlugin.prototype.setAlias = function (data) {
}
catch(exception){
- alert(exception);
+ console.log(exception);
}
}
JPushPlugin.prototype.pushCallback = function (data) {
@@ -117,7 +117,7 @@ JPushPlugin.prototype.pushCallback = function (data) {
}
catch(exception){
- alert(exception);
+ console.log(exception);
}
}
JPushPlugin.prototype.registrationCallback = function (data) {
@@ -125,7 +125,7 @@ JPushPlugin.prototype.registrationCallback = function (data) {
console.log("registrationCallback--registraionID is "+data);
}
catch(exception){
- alert(exception);
+ console.log(exception);
}
}
if(!window.plugins) {