Saturday, September 28, 2013

NSData * to NSString

characteristic.value values ​​are NSData * data type, the content is binary data. I want to display it on the screen, so to convert NSString. How transfer
Reply:
NSData * data = nil;
NSString * string = [[NSString alloc] initWithData: data encoding: <# (NSStringEncoding) #>];
return [string autorelease];

Attach your NSData and it can be decoded form
Reply:
[Data description]

No comments:

Post a Comment