Re: iOS equivalent of CordovaArgs getJSONArray() and getArrayBuffer()

2014-08-19 Thread Don Coleman
Sending data back in the PluginResult works well. Apparently for incoming data, I can just assign it to the proper type. NSArray *serviceUUIDStrings = [command.arguments objectAtIndex:0]; // JSON list of UUID strings NSData *characteristicValue = [command.arguments objectAtIndex:3]; //

Re: iOS equivalent of CordovaArgs getJSONArray() and getArrayBuffer()

2014-08-19 Thread Andrew Grieve
I think on iOS any ArrayBuffers come through as NSData*, as long as they are in the top-level exec() arguments (not nested within an object). There's also: [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:data] and: [CDVPluginResult resultWithStatus:CDVCommandStat

iOS equivalent of CordovaArgs getJSONArray() and getArrayBuffer()

2014-08-18 Thread Don Coleman
Is there an iOS equivalent of Android's CordovaArgs getJSONArray() and getArrayBuffer()?