How to use Core Data’s ManagedObjectModel inside a framework?

I’m a bit late for flohei’s issue, but hopefully this helps anybody else who wanders by. It is possible to get this to work without having to perform script-fu to copy resources around! By default Apple’s Core Data template gives you something like this: lazy var managedObjectModel: NSManagedObjectModel = { let modelURL = NSBundle.mainBundle().URLForResource(“MyCoreDataModel”, withExtension: … Read more