It's possible, I've done it. I made a desktop application to read from a CSV file using the code here:
http://www.mac-developer-network.com/columns/coredata/may2009/
I just had to alter the way the CSV part worked, and change the model.
- I copied and pasted my model from the model builder into the iPhone model. (Clicked on the "grid" area, selected all, copied)
- Then I took the sqlite database the desktop app produced (found it in Application Support, in the folder for this application) and put it into the resources folder
- I made some code to copy the sqlite into the documents folder on the iPhone (if it wasn't already there) at startup, in the
applicationDidLaunch
method. It's possible that having it in the resources folder is no good. Even though you're using the database as read only, Core Data may want to write something to it. Not sure about this though..
- I used the sqlite file in the documents folder in my Core Data set up.
The desktop and iPhone Core Data sqlite file seem to be exactly the same format. You can transfer one sqlite file to another application (iPhone to iPhone too) as long as they have the same data model. In another application, I used NSXMLParser to create the Core Data sqlite file, then transferred it to another app, both on iPhone using the Simulator.