I am an experienced C++/Java programmer but am new to iOS.
I am writing an iPhone application that allows the user to browse a very small amount of detailed hierarchical data, say, 10 books in a catalog. The app will have all the data on the phone. Initially, the app can be deployed to the app store without any data or a static set of data, but as the user uses the app over time, the app should download and cache new or modified content from my server. (E.g. If a book is deleted or is added to the catalog, it should be reflected in the user’s phone.)
What is the best way of doing this? I know that I want to poll my server when my app starts to check for new updates (e.g. check a file on the server that holds the last update timestamp). Now, in what format should I download new data? How should I maintain this data? Should I just download plist/XML files and manage them on the iPhone, or should I do something more sophisticated with SQLLite?
Again, the amount of data is relatively small.
I would populate your initial data set with a pList shipped with the app (so you don’t need to wait for the network response on startup). I would refresh the data with a request for JSON data from the server (a good Objective-C JSON parser).
Given your small data set, I wouldn’t go to the extra effort of an SQLLite DB. You can just stick that data in memory and persist it in flat files. Check out NSData writeToFile.