I'm building an application that needs to download web content for offline viewing on an iPad. At present I'm loading some web content from the web for test purposes and displaying this with a UIWebView. Implementing that was simple enough. Now I need to make some modifications to support offline content. Eventually that offline content would be downloaded in user selectable bundles.
As I see it I have a number of options but I may have missed some:
- Pack content in a ZIP (or other archive) file and unpack the content when it is downloaded to the iPad.
- Put the content in a SQLite database. This seems to require some 3rd party libs like FMDB.
- Use Core Data. From what I understand this supports a number of storage formats including SQLite.
- Use the filesystem and download each required file individually. OK, not really a bundle but maybe this is the best option?
Considerations/Questions:
- What are the storage limitations and performance limitations for each of these methods? And is there an overall storage limit per iPad app?
- If I'm going to have the user navigate through the downloaded content, what option is easier to code up?
- It would seem like spinning up a local web server would be one of the most efficient ways to handle the runtime aspects of displaying the content. Are there any open source examples of this which load from a bundle like options 1-3?
- The other side of this is the content creation and it seems like zipping up the content (option 1) is the simplest from this angle. The other options would appear to require creation of tools to support the content creator.