some_id
some_id

Reputation: 29886

Reading in text document from a server

I want to be able to store a text document on a server and then read this document when my app launches.

I would want to read e.g. a description for an object and item number, and a few urls to images and sound clips.

Is reading in and parsing a text document the best way to do it? If so how is it done?

Thanks

Upvotes: 1

Views: 64

Answers (1)

Matthias Bauch
Matthias Bauch

Reputation: 90117

If you can create any file you want on that server I would create a Property-List containing a NSDictionary. I think this will be the easiest way.

create the plist manually with the Property List Editor or programmatically with

- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag

put it onto your server and read it in your application with

- (id)initWithContentsOfURL:(NSURL *)aURL

Upvotes: 1

Related Questions