I want to ship static read-only data for use in my Core Data model. The problem is that there are obviously different persistent store types and I don’t know if the format of those types is supposed to be opaque or if I’m supposed to be able to construct them by hand.
Right now I just have a plist and it’s very small (maybe 30 entries total).
Should I just write code to import the plist into my data store when the app is first installed, or is there some way I can ship a hand-constructed initial version of the data store file?
(I’m using the default sqlite persistent store.)
I would not try to hand-construct it, but you certainly should execute an import and save a final Core Data SQLite file to ship with your app.
I plan to write a small mac utility (using the same data model) to generate the Core Data SQLite file for my iPhone app (the import is actually from a web server). Then, I will add the file that was persisted by the utility into my iPhone app’s project.