I’ve got an objectiveC class who’s methods I can invoke from javascript vai webscriptobject. However, I’d like to call my function from javascript providing a variable number of parameters. For example,
myclass.myfunction(arg1, arg2, arg3 ….) where in the objectiveC side the function isn’t limited to a specific number of arguments. I guess like using varargs.
Anyone does something like this before?
For my specific issue, i ended up implementing the following in my scriptobject. It lets me string compare against the function name and use the passed in array. Ideally should do some type checking on the arguments in the array…