Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view existing data in Core Data?

Well, may be this question is silly, but I couldn't find a way (except programmatically). I built a project (for iPhone OS 3.0) which uses Core Data. The xcdatamodel file shows the schema description, but I want to see the data in tabular form (like the management studio for mssql server or phpmyadmin for mysql).

Is there any way (except coding)? What is that?

Also, which file (in disk/device) those data are stored into?

[ I built the tutorial (from apple) on Core Data, named Locations. They used this line somewhere in the code: NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"Locations.sqlite"]];

But, I did not see any "xxxxx.sqlite" file in project location (nor in the disk).]

like image 570
mshsayem Avatar asked May 11 '10 13:05

mshsayem


1 Answers

The sqllite file is stored within your applications documents folder. If you're running in the simulator, that location will look something like:

~/Library/Application Support/iPhone Simulator/User/Applications/1C69B544-510C-47E0-8758-701FB9E259F7/Documents/Locations.sqlite

(Where the 1C69B544...701FB9E259F7 is a huge random number that's re-generated each time you reinstall the app into the simulator).

like image 78
David Gelhar Avatar answered Oct 13 '22 12:10

David Gelhar