I tested your code, and received a Cocoa Error 261
. This means that the JSON you are trying to load isnt encoded with UTF-8, so using NSUTF8StringEncoding
wont work. Try this
NSString *string = [NSString stringWithContentsOfURL:file
encoding:NSASCIIStringEncoding
error:&error];