Using an Existing SQLite Store with NSPersistentContainer

1 · Andrew Bancroft · July 10, 2017, 6:02 p.m.
If you’ve been creating the Core Data Stack without NSPersistentContainer and you’re thinking about switching things up to use NSPersistentContainer, you need to think about your existing SQLite persistent store. Creating the stack with NSPersistentContainer handles the creation of SQLite stores internally, so brand new setups using NSPersistentContainer are pretty easy. But how do you go about telling NSPersistentContainer about your existing SQLite store? Let’s take a look now at how you can c...