How to convert a CBPeripheral kCBAdvDataManufacturerData to an NSString iOS

Jump to: navigation, search

NSData *nameData = [advertisementData valueForKey:@"kCBAdvDataLocalName"]; NSString *nameString = [NSString stringWithFormat:@"%@",nameData]; //this works //this does not work // NSString *nameString = [[NSString alloc] initWithData:nameData encoding:NSUTF8StringEncoding]; //the above line did not work even if Encoding type was changed.

See also

Use your Android as a remote for garage door

Personal tools
Namespaces
Variants
Views
Actions
Navigation