Failed to load OMO warning (potential crash):
Project with xcode 9 following warning is observed in the console during debug/release builds (iOS 11 GM/beta & iOS 10):
CoreData: annotation: Failed to load optimized model at path "/Users/xyz.abc/Library/Developer/CoreSimulator/Devices/A-GUID/data/Containers/Bundle/Application/B-GUID/app-name.app/Frameworks/framework-name/mystorename.momd/mystorename 6.omo"
Any custom framework (e.g. GoogleMaps, etc) that uses CD also results in this warning and potential crashes.
Update: Using Xcode11, noticed similar issue with DTDeviceKitBase.framework:
CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode11.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/CrashDatabaseModel.momd/CrashDatabaseModel-5.0.1.omo'
Note:
- Also noticed this with modal used in app and other framework. For app, clean build results in this error. Path shown in warning points to model used with app and not a framework.
- Compilation with previous Xcode do work fine and no warning is noticed.
Tried following:
- complete clean build
- ensured omo exists in datamodel v6, ManagedObjectModel & PersistentStoreCoordinator are non-nil. All functionality works as expected.
- add newer version of datamodel v7, ensured omo v7 exists -- clean builds & device deployment
- added schema again
Please add suggestions. What are the potential implications of this warning?
Related:
- https://openradar.appspot.com/33212613
- https://openradar.appspot.com/33573724
- https://openradar.appspot.com/33773917
- https://issuetracker.google.com/issues/35827124
- https://issuetracker.google.com/issues/35827113