Getting Started with MagicalRecord

Get started with MagicalRecord, an active record-style library to make your Core Data code cleaner and simpler! By Ed Sasena.

Leave a rating/review
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Where To Go From Here?

You can download the finished project, which could be helpful if you get stuck somewhere.

Hopefully, this MagicalRecord tutorial demonstrated how easy it is to get up and running with MagicalRecord. It really helps cut down the boilerplate code! The fundamentals explored in this tutorial can assist in developing all kinds of apps that help users keep track of things they like with pictures, notes, and ratings. Enjoy!

If you want to develop the BeerTracker project further, here are a few ideas to get you started:

  • Add a “no beers created yet” message to the BeerListViewController – lookup the hasAtLeastOneEntity method in MagicalRecord and use it.
  • Add a message to indicate how many beers match the search pattern in the search bar. Use the countOfEntitiesWithPredicate method.
  • Implement a database reset function. Lookup the truncateAll method from MagicalRecord.
  • For fun open up MagicalRecordShorthand.h in the Pods target under Pods/MagicalRecord/Shorthand and read through the method names. Most of them are self explanatory. This header file should provide more insight into using MagicalRecord.

If you have any questions or comments about this tutorial, then please join the forum discussion below! If I’m late in responding, then I might have taken the BeerTracker on a tour of Vermont’s craft breweries. :]

Ed Sasena

Contributors

Ed Sasena

Author

Over 300 content creators. Join our team.