tags:

views:

47

answers:

2

hi guys,

i'm working on iphone application which needs to run offline at an exhibition. It should present data, stored local because there is no internet at the booth. Still, to easily have content updates it should be able to update it's content once connected to internet.

It's quite some data ( around 300 full lines of text ) and I want it to be loaded, stored and visualized as optimized as possible.

What's the best way to load in content once connected and how should I store it on the device?

A: 

I think to store it on the device you can use the NSUserDefaults

http://developer.apple.com/Mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html

You could also load your content asynchronously using an NSInvocationOperation

jkeesh
A: 

You can use a property list: use [NSKeyedArchiver archiveRootObject:myString toFile:path] to save an NSString to disk.

The folder to store the file at can be determined with:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
Diederik Hoogenboom