Core Data, how do I open DataStore.sql in Mountain

2019-08-16 15:04发布

问题:

To bring some clearity to what's happening as I work with Core Data, I DL the free SQLLite Database Browser (SQLDBB). It worked fine to copy the db from the iOS simulators Documentsfolder into my desktop and then open it and browse db content just fine in SQLDBB.

BUT

Since the simulator library files are hidden in OSX Mountain Lion by default, I can't use the normal SQLDBBs Open-file dialog to open it.

The file is here in my Mountain Lion Finder (used Finder > Go > "Go to folder" to get it);

~/Library/Application Support/iPhone Simulator/5.1/Applications/...aAppIDnr.../Documents/DataStore.sql

Any suggestions to open it directly in SQLDBB?

回答1:

SOLVED! But couldn't answer my self due to repurtationrestrictions, hence this comment.

1. Browse to your simulator folder as mentioned above. 
2. Simply "drag & drop" the DataStore.sql file onto the SQLDBB and it will open. 

You now have a "live" DB viewer while working with Core Data in Xcode Simulator, pretty handy :-)

P.s. The current SQLDBB (v2.0b1) does not have a Developer ID attached to it, so to open it in Mountain Lion you need to hold ctrl on it's icon > choose open...