Opening `.omo` file directly considered harmful
First of all, thanks for the book! It's been extremely helpful to us working with Core Data in our app.
We recently got an email from Apple advising us that opening the .omo file for a managed object model is not supported, since the file format can change from release to release:
We are reaching out to you regarding your app, XXXX. We’ve identified an issue for this app on devices running the iOS 11 beta.
We noticed you are opening models by passing the URL for the optimized model to -[NSManagedObjectModel initWithContentsOfURL:]. This is unsupported as the format for .omo files can change in a non-backwards-compatible fashion at any time.
Please address this issue to avoid any problems once iOS 11 is released. If you need further assistance please follow this link: https://developer.apple.com/support/technical/
For your reference we’ve tracked this issue in bug ID 32238005.
You may want to update the sample code and next revision of the book to reflect this guidance.
I was just running into this issue as the binary .omo file format seems to have changed with High Sierra as well.
Whats the proper way to fix this in the moody project?
I've created a pull request with a fix for this. Note that you may still get a warning logged to the console if you build with an older Xcode; this is expected and benign.