Apr 242013
 

A recent StackOverflow question got me thinking about the best way to manage a Core Data Migration. This post won’t address how to map your model or do a lightweight migration; rather, it will focus on how and where to launch the migration process. The question on StackOverflow asked how to manage a migration that […]

Nov 052012
 

It is often useful to open an MKMapKit annotation in the native iOS Maps app. Here’s a function that will do this for you, and takes into account the recent changes with iOS 6. // This function accepts an MKAnnotation and opens it in the native iOS Maps App +(void)openInMapsWithAnnotation:(id<MKAnnotation>)annotation { Class itemClass = [MKMapItem […]

Sep 252012
 

I’ve released v0.7 of my RHManagedObject Core Data library for iOS.  This new version cleans up a lot of code and standardizes some of the aggregate functions.  It’s backwards compatible to v0.6, but requires a small modification to your entity subclasses. You can download and read about it on GitHub.

Dec 022011
 

NOTE: This post has been superseded by Simplifying Core Data Part II. RHManagedObject RHManagedObject is a library for iOS to simplify your life with Core Data. It was motivated by the following: Core Data is verbose. Have a look at Listing 1 from the Apple Documentation and you’ll see it takes ~14 lines of code […]

Nov 282011
 

Those familiar with Django might know about the useful timesince template filter, which compares the interval between two dates and formats it into a human readable format. I wanted something like this in my iPhone app, so I wrote a category to do it. The category adds a -timesince method to NSDate, which compares the […]