javascript - Pass an array to Flurry's setAge (Cordova) -


i'm building app client has multiple age ranges user optionally select. example, have button labeled age range of 18-24. question is, allowed pass multiple integers in array window.plugins.flurry.setage(); ?

i have following code:

var setage = function(low,high) {     var agelow = low;     var agehigh = high;     var age = [];       while(agelow <= agehigh){         age.push(agelow++)     }     window.plugins.flurry.setage(age); };  $('#set-age-one').on('click', function() {     setage(18,24); }); 

when viewing flurry's verbose mode in xcode, confirmation values 18-24 indeed set properly. however, it's followed error code of appname[31368:60b] -[__nsarraym integervalue]: unrecognized selector sent instance 0x10ae1bd10

this doesn't terminate or break app in fashion, i'm wondering if output flurry's audience > age section on user dashboard. wait 6-8 hours dashboard update , find out, i'd rather know sooner that.

edit: here's link plugin i'm using

also, here's full excerpt xcode:

2014-08-18 13:42:49.500 appname[31904:60b] setting flurry age (     18,     19,     20,     21,     22,     23,     24 ) 2014-08-18 13:42:49.500 appname[31904:60b] -[__nsarraym integervalue]: unrecognized selector sent instance 0x10aa00760 

solution: in case runs issue own project, following logs single integer age range:

var setage = function(low,high) {     var agelow = low;     var agehigh = high;     while(agelow <= agehigh) {         window.plugins.flurry.setage(agelow++);     } }; 

looking @ ios code method setage can pass single value method. though js side accepts array [age] cordova handler pass data easily.

the ios method referencing:

int age = [[command.arguments objectatindex:0]integervalue]; 

which states converting first index of object true int. if pass array first index of object code fail since cannot convert array int.

i suggest changing 18-24 1824 can capture age range int , pass string instead of array of int strings.

additionally, if need capture values, can recursively call setage each value individually.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -