0

I am loading a large amount of data from a XML-file to a core database which takes a while. Is it possible to publish the preloaded core data to the Apple app store to avoid the initial load at the fist startup of the app?

Ing. Ron
  • 2,005
  • 2
  • 17
  • 33
  • 1
    I agree the question is a duplicate, but the first answer isn't very clear or efficient. The best part is a link at the end to a Ray Wendelich tutorial that overcomplicates the approach as the user notes. A simpler version of that approach would be: 1. Create and populate the database in your app, 2. use the window: devices view to download the container with your app to your Mac, 3. show the package contents and get the .sqlite database file, 4. drag it into your app in Xcode using "Add to Target", and 5. modify your persistent store definition to use the URL of the file as your database. – Ron Diel Jan 28 '17 at 22:30
  • Thanks, with that explanation I understand how to use it! – Ing. Ron Jan 29 '17 at 09:11
  • @DanClark: If I load the core database before archiving the app to upload it to the App store will all core db records there at the app store app? I mean I will load the core db with all needed data. Then select "Product" -> "Archive" in Xcode and finally "Upload to App Store..." – Ing. Ron Jan 29 '17 at 21:55
  • My reading is that it will, but I haven't published to the app store yet. The sqlite file with all of the data will be in the bundle and will be used for the persistent store so it certainly seems like it should, but I can't give the assurance of having done it yet. – Ron Diel Jan 30 '17 at 16:16

0 Answers0