diatrevolo
diatrevolo

Reputation: 2822

Getting initial content into an app on installation

I'm making an iOS app that will have updatable content, and I want to include some initial content with the app installation. Knowing content placed in the main bundle can't be modified, where should I store this initial content, and how could I get it there, short of downloading it on initial launch?

Upvotes: 0

Views: 64

Answers (1)

Tim
Tim

Reputation: 60130

Content in the main bundle can't be modified, but it can certainly be copied to your user's documents folder and used from there. In your -applicationDidFinishLaunching: or similar on-startup method, you can:

  1. Get the path to the desired documents folder/file
  2. Check if any of your downloaded content already exists at that path
    1. If not, copy your special resource from the main bundle to the documents folder
    2. If so, just keep going - you already have content
  3. Continue by downloading updates or whatever else your app needs from the network

Upvotes: 1

Related Questions