drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 132 forks source link

CoreData: Failed to load optimized model at path #205

Closed asciiz closed 8 years ago

asciiz commented 8 years ago

OS X 10.11, Xcode 7, Ensembles 2.2.3

If "initWithEnsembleIdentifier:" is called, the following message is logged:

CoreData: Failed to load optimized model at path: ...Ensembles.framework/Versions/A/Resources/CDEEventStoreModel.momd/CDEEventStoreModel_2.omo

drewmccormack commented 8 years ago

Please try the more recent releases (eg 2.3.2)

jefarmstrong commented 8 years ago

I just downloaded the latest version 2 and I'm getting the same error. It's while running on ios simulator.

drewmccormack commented 8 years ago

So you have a Mac app, and you are using the binary Ensembles.framework? Update: I see you are actually in the iOS simulator. So how are you linking? Looks like you are linking with the framework? Is that the iOS module?

jefarmstrong commented 8 years ago

Update: I followed the directions in the ensembles book, dragged the Ensembles.framework and Ensembles.bundle from Ensembles 2.4/Binaries/iOS/Static Framework into my the project.

drewmccormack commented 8 years ago

What is really odd is that it seems to have found the model in the framework, and there shouldn't be one there. Maybe something went wrong with the build: ...Ensembles.framework/Versions/A/Resources/CDEEventStoreModel.momd/CDEEventStoreModel_2.omo

Drew

jefarmstrong commented 8 years ago

I believe that it's getting the momd from the Ensembles.bundle, not the framework.
CoreData: Failed to load optimized model at path '/var/mobile/Containers/Bundle/Application/1390FEB6-94F0-479D-87C7-35C0EF3085EA/Fishie.app/CDEEventStoreModel.momd/CDEEventStoreModel_2.omo'

It's not really a problem, afaik, since it's just the optimized model and everything will work fine without it.