I have an issue with the initWithData: method of NSString, here is code:
NSData *dataObj = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSString *strObj = [[NSString alloc] initWithData:dataObj encoding:NSUTF8StringEncoding];
Here, problem with initWithData: is that it does't return an instance of NSString, I tried doing an explicit type-cast using (NSString *) as well without much luck. This is giving me compiler warnings when I try to pass the stringReply to a method I've written with type mismatches. Given I treat all warnings as errors, I'd really like to understand what stringReply is being returned as and how I can enforce it to be of type NSString.