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]; //
JavaScript Uint8Array
On Tue, Aug 19, 2014 at 10:01 AM, Andrew Grieve <[email protected]>
wrote:
> 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:CDVCommandStatus_OK
> messageAsMultipart:arr]
>
> Which lets you send back either a single NSData*, or the latter an array
> where each element can be a NSData (or other supported arg type)
>
>
>
>
> On Mon, Aug 18, 2014 at 9:28 PM, Don Coleman <[email protected]>
> wrote:
>
> > Is there an iOS equivalent of Android's CordovaArgs getJSONArray() and
> > getArrayBuffer()?
> >
>