So far I’ve kept app data on remote servers in the plist format. Downloading and parsing this format is relatively easy:
NSURL *url = [NSURL URLWithString:@"http://www.mysite.com/data.plist"];
NSDictionary *plistData = [NSDictionary dictionaryWithContentsOfURL:url];
How can I download a text file with an arbitrary format using Objective-C?
An example of arbitrary format is a file that’s two sections of CSV data separated by a few blank lines. Of course I’ll know the format ahead of time.
Use
-[NSString initWithContentsOfURL:encoding:error:, like soThis will get you the file’s contents which you can treat however you need to.