Core Data Error: Can’t Find Model for Source Store
Well, I’m still learning how Core Data works and how it works with iPhone OS 3.0. The following displays how I was able to resolve an error running an app using Core Data and a pre-populated SQLite database. The error gives the reason as “Can’t find model for source store”.
1. Create a new SQLite database with the following tables and columns.
|Z_VERSION (Int Primary Key)|
|Z_ENT (Int Primary Key)|
ZFriends is an example of the pre-populated table with the columns (or attributes) FirstName and LastName. Z_METADATA and Z_PRIMARYKEY are the tables necessary for Core Data functionality.
2. Create the Data Model (xcdatamodel file) in XCode.
a. Create the Entity (Table Name without the leading ’Z’).
b. Create the attributes (Columns).