Byte Array to NSData

Here is an example of getting your data into a NSData object.

const unsigned char bytes[] = {values here};
NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
NSLog(@"%@", data);

Leave a Comment