Tag Archives: NSManagedObject

Unit Testing Core Data NSManagedObject with Kiwi

      5 Comments on Unit Testing Core Data NSManagedObject with Kiwi

The project that I am working on at the moment utilises Core Data for storing data, and that meant that I would need to figure out how to unit test the model. Most of what you are going to need to do is validate that your managed objects come back with appropriate defaults when first allocated, and that bounds checking… Read more »

Core Data: Transient Properties on NSManagedObject

      15 Comments on Core Data: Transient Properties on NSManagedObject

Transient properties are properties on a NSManagedObject that are not persisted to the object store. They are calculated at runtime, usually on the basis of other property values. The classic example would be for a Person object, generating a fullName property that is not persisted to the object store as both firstName and lastName are, so it can be composed at runtime.

Revisiting the Core Data Singleton

      2 Comments on Revisiting the Core Data Singleton

Whilst I’m sure the idea of a Singleton for application wide variables is going to be good one, I must say that I’ve revisited this idea over the last couple of days, especially with the help of an article Core Data: Passing around a NSManagedObjectContext on the iPhone which helps to set the perspective (as it should be) to the… Read more »