I've created a framework that's a cocoapod, the framework uses core data, my pod spec has:
s.resource_bundles = {
'FrameworkModel' => ['Model/**/*.xcdatamodeld']
}
and everything works fine in a demo app that's a different target in the framework work space, however when I install it as a pod I got an
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSFetchRequest could not locate an NSEntityDescription for entity name 'EntityName''
I'm not quite sure what to try but I did change the module name on the data model file with no effect. (I went from the name of the framework project to 'Current Product Module' and back.
I do see the data model file in the pods project in the workspace.
My problem was caused by how I created my core data stack, specifically the managed object model, which I was creating from a URL from a bundle that doesn't exist as a pod consumer, so now it's in definition I check if a bundle is available as it would be in the workspace (for the demo app), or if it exists under the name of the resource bundle defined in my pod file, like this: