O'Reilly logo

RestKit for iOS by Taras Kalapun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Database seeding

In the context of Core Data, seeding means shipping your application with a persistent store pre-populated with default data. There are two ways to seed a database:

  • On the initial app start, copy the pre-populated database from the application's bundle
  • Seed the newly created database with data from JSON, XML, or another source

The second way is not the best, as seeding from a source will require parsing, mapping, and inserting operations that will slow down the application start, thus giving negative user experience. But this way can be used to create a seed database on the developer's machine.

You usually configure database seeding by copying an existing target to a new one that will be used to generate the seed database. The main ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required