JSON web file is not overwriting and replacing the local JSON file on the App.
-(void)writeJsonToFile
{
NSURL *fileJSON = [[NSBundle mainBundle] URLForResource:@"data" withExtension:@"json"];
NSString *filePath = [NSString stringWithFormat:@"%@",fileJSON];
NSString *stringURL = @"website.com/data.json";
NSURL *url = [NSURL URLWithString:stringURL];
NSData *urlData = [NSData dataWithContentsOfURL:url];
[urlData writeToFile:filePath atomically:YES];
}
The destination for urlData and filePath files match each other. Been looking around the site and other places online, made sure the file path matched.
We can never change the NSBundle file but you can save in to local then try this
This code replacing local JSON file when call. Your JSON file save in your application directory/Documents/ and file name is data.json
website.com/data.json do not return json data, please check it and if needed to change your URL.