In Xcode Object-C to print out NSData to NSLog you might run into rubbish output by just outputting the NSData NSLog(@”%@”, myData); And as output something like this: <3c3f786d 6c207665 7273696f etc… This is not rubbish, though it might look that way, this is correct behavior and is just in hex format. If you know
Tag: object-c
Xcode Object-C NSUrl to NSString
In Object-C to convert back and forth from NSUrl and NSString take a look at this example: NSString *urlstring = [NSString stringWithFormat:@”http://spacetech.dk”]; NSURL *url = [NSURL URLWithString:urlstring]; NSLog(@”url = %@”,url); This will first save a NSString, then create a NSUrl from the String, and last output the NSUrl in the log