When building and running a Core Data project (created with Xcode 10) using Xcode 11 (beta 3) on an iOS 12 device, I get the warning:
CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/7908B3F7-66BC-4931-A578-6A740CBFB37D/TestOMO.app/TestOMO.momd/TestOMO.omo'
There is no warning if
- I build and run it using Xcode 10 on iOS 12 device
- I build and run it using Xcode 11 on iOS 13 device
My app seems to work fine and there are no crashes, so I am not sure how seriously to take this warning. Nonetheless I would surely prefer to get rid of it.
There are many posts related to this Core Data annotation, but most are either related to Google Maps or are unanswered.
I have created a new project to eliminate other causes for the issue related to my own project and to make it easy to reproduce as follows:
- Create a new project using Xcode 10 (Single View App, Use Core Data)
- In AppDelegate.swift, add print ("psc = (persistentContainer)") to func application(_ , didFinishLaunchingWithOptions:) (just to force lazy var initialisation)
- Build and run on an iOS12 device: no issues
- Open the same project in Xcode 11, build and run on an iOS13 device: no issues
- Sill in Xcode 11, build and run on an iOS12 device: you will get the warning quoted above
Cleaning the build folder or deleting derived data is of no help.