iphonecocoacocoa-touchcore-data

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).]


Solution

  • To view the coredata sql file, you can use any standard sqlite interface. You can use sqlite3 from command line, or use something like Sqlite Browser.