NSManagedObject; keep or load into a custom NSObject?

core-data, ios, nsmanagedobject, objective-c

Solution

An encouraged way is to build a category of your NSManagedObject subclass and implement your custom methods in this category. That way you can re-create your NSManagedObject subclass through Xcode if your schema changes and your category remains intact and unaffected.

Reference: e.g. Paul Hegarty's / Stanfords iOS courses on core data

Problem

I'm using Core Data to store objects. I have a `NSManagedObject` Person and a `NSObject` Person. They both have the same attributes. The `NSObject` has some methods. Right now, I search Core Data for Bob. I then take that `NSManagedObject` Bob and copy all the attributes to the `NSObject` Bob and do what I need with it. Does this make sense or should I create the needed methods in the `NSManagedObject` instead? Can a `NSManagedObject` be treated the same as a `NSObject`?

Original source