Quote:
Originally Posted by BebopSong
Hi,
Can anyone tell me the best way to create and store data on the iPhone so that the app can read the data but also write to it?
I am creating an app that has a main list of items that the user can pick from to go into their own seperate list. I have been looking at property lists, which look like a good option to me but wasn't sure if I am missing other better types as I am new to Objective-C, iPhone SDK and Cocoa.
There will be quite a bit of data in the main list and the user will be constantly writing to and from their list, does this affect which data type to use?
Thanks in advance.
BebopSong
|
Plists are fine for small amounts of data, but the drawback is that you don't have random access, you always need to read/write the whole file.
For iWoman I used encodeers/decoders because at that time I thought that SQLite was too difficult.
But for GeoCorder I tryied out SQLite and now I would not do anything else. I learned the most from the SQLite Books example, copyied most of my data code from there.
With 3.0 comes Core Data and this will most likely be the standard way to do it beginning in June. I played a little with it and it is very cool, although you lose the ability to customize your table structure it will fit 99% of devs.
__________________
regards
Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
Linguan – makes localizing strings file fun!
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!