views:

371

answers:

3

Is there any way in which I can view my core data database without having to load it programatically through the code?!

A: 

you can go to Application Support folder (which is usually ~/Library/Application Support/YourAppname/) and view YourAppname.xml file.

Usually while in development CoreData storage is in XML format. You can change it in one of AppDelegate's methods (i presume you created Core-Data Application)

Eimantas
+1  A: 

It depends what format the data store is (Core Data currently supports XML, binary, and SQLite persistent data stores). XML data stores can be viewed using a text editor. Binary data stores can only be accessed via code. You can open a SQLite data store via the sqlite command line or via any number of GUI SQLite browsers. Keep in mind, however, that the on-disk representation (in a data base or otherwise) is an implementation detail of how Core Data chooses to persist an object graph to disk. Don't rely on this format in any way except to satisfy your curiosity. If you are trying to track down a bug, there are much better ways than poking in the data store.

Barry Wark
+1  A: 
~/Library/Application Support/iPhone Simulator/User/Applications/{APP GUID}/Documents/your_xcdatamodel.sqlite
joshwa