Separate NSData into smaller NSMutableData objects
Question
I am unsure of how to separate a NSData object into smaller parts so that I can send it over bluetooth. I believe it is a method similar to this:
- (void)getBytes:(void *)buffer range:(NSRange)range
I do not know what to pass in for the buffer. Do I just pass in a NSMutableData object to hold the bytes that I pull out of the original NSData?
Thanks
Solution
You can use the -subdataWithRange:
method.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow