I am writing a very simple application, for the iPhone. Unfortunately I am really a newbie.
What I am trying to do is to save data at the end of a user experience. This data is really simple, only string or int, or some array.
Later I want to be able to retrieve that data, therefore I also need an event ID (I suppose).
Could you please point out the best way, API or technology to achieve that, XML, plain text, serialization… ?
NSUserDefaultsis a good choice for small amounts of data.If you need to manage something larger than a kilobyte or so, you might consider using the
initWithContentsOfFile:methods ofNSArrayorNSDictionaryto read in a .plist file. To write the file, use thewriteToFile:atomically:methods. This file needs to go in your app’s documents directory.