About This
I am Michael Tyson, and I run A Tasty Pixel. I write on a variety of technology and software development topics as I travel around Europe in a motorhome.
-
Subscribe to updates 489 feed subscribers
Follow me on Twitter 964 followers
Our Products
Newsletter
Let us keep you informed about important updates, special offers, and new products. Just type in your email address below and hit enter to sign up!
-
Recent Posts
Topics
Audio Business Career Cocoa Code Data Debugging Demo Design Development Google Graphics Interface iPad iPhone Lifestyle Links Location Loopy Loopy HD Mac Maps Marketing Networking Optimisation PHP Scripts Security Shell Social Comment Software Talkie Talkie-for-Mac The Cartographer Travel Tutorial Twitter Update Utility Web WordPress WordPress Plugins WordPress Themes Workflow XCode




Browsing Core Data databases using F-Script
F-Script, the Cocoa-based scripting environment, now provides some great tools for exploring Core Data databases.
I couldn’t figure out how to easily open up my databases, other than manually creating a managed object model, then a persistent store coordinator, then a managed object context on the console. I couldn’t find any existing tools, and I wanted a quick workflow for opening up my databases, so I put together a script that prompts for the application bundle or
.xcdatamodel(d)data model file, then prompts for the XML (.xml), binary (.binary) or SQLite (.sqlor anything else) database file, and opens up the inspector.I wrote it as an Applescript that just calls upon F-Script to evaluate the script, and saved it in an application bundle so I can pull it up quickly.
Here it is:
Core Data Browser.app
It just needs the F-Script app to be available.
Upon opening, the managed object context is available on the console as “
context“. So, aside from using F-Script’s object browser, you can also do things like:Update: Now has better error reporting, and the option to load classes from a bundle.
For those interested, here’s the original F-Script: Read More »