I am trying to fetching a JSON
file which exist in my xcode
resources using this code
-(void)readJsonFiles
{
NSString *str=[[[NSBu
It's failed to read your file for some reason. Use -dataWithContentsOfFile:options:error: to find out why.
NSError* error = nil;
NSData *fileData = [NSData dataWithContentsOfFile:str options: 0 error: &error];
if (fileData == nil)
{
NSLog(@"Failed to read file, error %@", error);
}
else
{
// parse the JSON etc
}