You can do it this way
NSString *yourStr= [[[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding] autorelease];
or the ohther way to use it when the data ends with a null is:-
NSString *yourStr= [NSString stringWithUTF8String:[theData bytes]];