You can watch this episode by subscribing to Cocoacasts Plus.

Seeding a Core Data Persistent Store

Seeding Data Asynchronously

Seeding a Core Data Persistent Store
1 Three Strategies 05:11
2 Hard-Coding Seed Data Plus 09:52
3 Seeding Data Asynchronously Plus 08:34
4 Avoiding Duplicates Plus 08:12
5 Loading Seed Data From a File Plus 08:21
6 Loading Seed Data From a Remote Server Plus 05:45

We successfully seeded the Core Data persistent store with hard-coded seed data in the previous episode. While the implementation works fine, it isn't perfect. Seeding the persistent store takes place on the main thread. We invoke the seed() method in the viewDidLoad() method of the NotesViewController class and we insert the managed objects into the main managed object context of the Core Data manager.

Purchase Course

Purchase Seeding a Core Data Persistent Store and access it whenever you want and for as long as you want.

Join Cocoacasts Plus

Join Cocoacasts Plus and access every 350+ tutorials including Seeding a Core Data Persistent Store.

Next Episode "Avoiding Duplicates"