Why should I use Core Data for my iPhone app?

Core Data will mainly help in the auxiliary facets of the application – things like data persistence, presentation, etc. Some bullet points for your boss:

  • Core Data manages save and undo functionality for you. It has a persistent store, which tracks changes, and can be flushed to the disk automatically at any number of times (app close, etc.).
  • Core Data and related classes provide easy ways to get your entities into UITableViews, like NSFetchedResultsController.
  • Core Data abstracts away a lot of the messy things you’d otherwise have to deal with yourself, such as lists of objects, one-to-many or many-to-many relationships, or constraints on object attributes, into a single nice clean object-oriented interface.
  • Core Data comes with a nice graphical object model editor that can help you think through your object/entity design, and refine it as you go. (It also supports migration, so if you decide later that you want different attributes on your entities, you can do that relatively easily.)

Sure, the learning curve may be a bit steep, but the Apple examples are great to start with, and the Core Data documentation is very complete and helpful. Once you’ve got Core Data down, it’ll be a breeze to build your app.

Leave a Comment