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. :]