How can I use a pre-populated core data DB on my device
I have developed my app using core data. It works fine in the simulator. When I deploy it to the device the DB is empty. It is 49k where it should be 484k.
Basically it is not populated. Since I don't write to the DB when the app is running I need to provide a populated DB to the App. So I copied the populated DB from the sim开发者_如何转开发ulator to resources and then deploy.
Still no luck. the populated DB is in MyApp.app and the AppDelegate is reading from the Documents directory. How do I either get it in the documents directory or get the app delegate to look in the app?
Thanks in advance,
Andrew
Take a look at this question: Any way to pre populate core data?
精彩评论