In my iOS app, I am using NSURLSessionTask
to download json data to my app. I discovered that when I call the url directly from the browser, I get an up to date json and when it's called from within the app, I get an older version of the json.
Is this due to caching? How can I tell NSURLSessionTask
to not use caching.
This is the call I use:
NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
Thanks!