Is there a good Core Data browsing tool out there?

2020-01-30 06:09发布

One of the things I miss from moving from SQLite to Core Data is the ability to query directly against my database to analyze data. Is anyone out there aware of a tool that allows for the browsing of a Core Data store in a similar fashion?

标签: core-data
7条回答
2楼-- · 2020-01-30 06:43

MesaSQLLite - all i wanted was to view some data. This did it, nice and easy.

查看更多
可以哭但决不认输i
3楼-- · 2020-01-30 06:51

CoreDataEditor is $20 and doesn't make it quick and easy to browse the relationships of the managed object context. There was also some insanity about having to have the MOM use exactly the same name as your application (??!), or somesuch. I'm not about to go in and start renaming stuff just to browse my object store. Admittedly, it does have a pretty cool application icon, and I assume from the name that you can edit stuff. But, like the original poster, I just need something that will let me crack open a Core Data persistent store and quickly grok my managed objects.

I've found that a much better solution, one which offers intuitive and easy browsing of the relationships of managed objects, and which is free, is detailed here:

Browsing Core Data databases using F-Script

You basically install F-Script, and then run Mr. Tyson's Applescript, which asks you to locate your MOM (e.g., YourApp.app) and then the SQLite database that is being used as the persistent store (i.e., YourAppPersistentStore.sqlite). If you are using the iPhone Simulator, these are both in your Simulator directory -- for example:

/Users/me/Library/Application\ Support/iPhone\ Simulator/4.2/Applications/5452AC87-0426-4303-9402-C5F5900C7321/YourApp.app
/Users/me/Library/Application\ Support/iPhone\ Simulator/4.2/Applications/5452AC87-0426-4303-9402-C5F5900C7321/Documents/db/YourAppPersistentStore.sqlite 

Then select an Entity and hit 'fetch'. You can run a NSPredicates to filter its items, or click on an item and click 'Browse'. It opens "F-Script Object Browser" and from this window, you can follow relationships and basically tour all the items in your entire managed object context, inspecting all the attributes for each item. It's super awesome.

查看更多
家丑人穷心不美
4楼-- · 2020-01-30 06:53

There is a similar topic here How view data stored in Core Data?

I have already added a comment where I say I created a macOS app to browse your Core Data content. It hides Core Data implementation as you see when you use a SQLite browser. Also you can list all your latest run apps and simulators, with this you can easily find the app you are looking for. More info here:

http://www.microedition.biz/simMagnifier

It has other features like access Simulator's folders such as Documents, Application Support, etc. You can check the content of NSUserDefaults too.

The app is not free sorry! but at least you have a 7 days trial.

查看更多
We Are One
5楼-- · 2020-01-30 06:55

I ended up using SQLPro for SQLite (https://www.sqlitepro.com/) Even free version is enough for development (in full version you get inline editing etc.)

  • pros - can make sql queries
  • cons - doesn't show relationships

Also recommend Simpholders app (http://simpholders.com/) it opens finder with db.sql file containing folder

查看更多
爷的心禁止访问
6楼-- · 2020-01-30 06:57

CoreDataPro lets you explore your data model and view data that your application has stored. You can download it from the project page on github:

https://github.com/yepher/CoreDataUtility

查看更多
迷人小祖宗
7楼-- · 2020-01-30 06:58

If your using SQLite as a backend, you can try my app SQLite Professional (App Store).

The app has a few neat features such as:

  • Auto-completion and syntax highlighting.
  • Versions Integration (rollback to previous versions).
  • Inline data filtering.
  • The ability to load sqlite extensions.
  • SQLite 2 Compatibility.
  • Exporting options to CSV, JSON, XML and MySQL.
  • Importing from CSV, JSON or XML.
  • Column reordering.
  • Full screen support.

There is a seven day trial available via the website and a free readonly version available on the mac app store.

查看更多
登录 后发表回答