开发者

CoreData from simulator to device, but device has no information

Ok, this question has been asked allot, but i still don't get it. My problem is :-

I have a coredata application. I store data using the simulator. Data such as strings and images that will output in an output view.

Whenever i use the simulator, i have information stored and it runs well. But when i run the application on a device, there is not data. I am stor开发者_开发技巧ing data using the simulator, and once i run it on a device, it doesnt show the data that ive stored using the simulator. I believe i have to take the database from the simulator or something, but i've no idea on how to get to the simulators database. Can anyone help


Have a look at User/<YourName>/Library/Application Support/iPhone Simulator/<SDK Version>/Applications/<ApplicationID>/Documents/<YourDatabaseName>.sqlite. Copy that file and put it into you app bundle. Than have a look at the iPhone Recipes sample code from the apples sites to see how you can load the data from a pre filled core data base.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜