0

I am trying to understand something that is not clear to me about the storage and access of additional content downloaded from my own server to my iOS app. Clearly this is possible, see the section called Downloading Content from Your Own Server . I understand how to process receipts and how to make a call to my server. What is not understood is:

  • When I initiate a download from my server what file type does the download need to consist of? Can it be anything I want?
  • Where I am a supposed to store it on the device considering the app bundle is not allowed to be updated?
  • How does my app access the data?

In the simplest of cases, say I am delivering an xml or json file I guess most of the above would work like this: store the file in the documents directory, use filepaths in the app to access and load the data.

However what if it is something more complex that includes say images and other data that should be accessible just like other resources in the app bundle are accessible?

The crux of what is not clear to me is what type of data can be delivered, if it is anything I desire (which I presume it is) and I have complete control of the data type, where should this data content be stored and how can I enable my app to access this data as seamlessly as possible. For a concrete example suppose I am making a game, the first level is included in the app bundle, I deliver the second level via my own server, now, can I load that level the same way I load the one in the app bundle?

If there is a link or documentation I can pointed to that would be helpful but I have not found anything just yet, perhaps it is the concept of the app bundle that is most confusing because on a regular program I can do whatever I wish and things are not so unclear.

ajeetdl
  • 1,254
  • 1
  • 13
  • 17
  • Read up on Core Data. http://www.raywenderlich.com/934/core-data-tutorial-for-ios-getting-started Type of data? Anything you want. There is no pre-built way of doing this. There is no "add content" button. You download the information and then use that information to add stuff to your app. – Fogmeister Sep 16 '14 at 10:42
  • This answers the first question and thanks for the link but I am already aware of Core Data. What is still unclear to me is the storage of downloaded app content in or around the app bundle and apps accessing the data the same way they do with resources included in the app bundle though. – ajeetdl Sep 16 '14 at 13:39
  • Maybe the solution is not how to separately access data from the bundle and downloaded data. Maybe the solution is to only have your data in one place (CoreData). That way when you download new data you are adding that into the same place too. – Fogmeister Sep 16 '14 at 13:41

0 Answers0