From b6f5120a7f9c17ecdcf42ab69a05c6598ca965b7 Mon Sep 17 00:00:00 2001 From: David Paschich Date: Mon, 13 Nov 2017 10:25:59 -0800 Subject: [PATCH] Don't open the .omo file directly --- SharedCode/ModelVersion.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SharedCode/ModelVersion.swift b/SharedCode/ModelVersion.swift index 0fbc5ab..a310990 100644 --- a/SharedCode/ModelVersion.swift +++ b/SharedCode/ModelVersion.swift @@ -34,9 +34,9 @@ extension ModelVersion { } public func managedObjectModel() -> NSManagedObjectModel { - let omoURL = modelBundle.url(forResource: name, withExtension: "omo", subdirectory: modelDirectoryName) - let momURL = modelBundle.url(forResource: name, withExtension: "mom", subdirectory: modelDirectoryName) - guard let url = omoURL ?? momURL else { fatalError("model version \(self) not found") } + guard let url = modelBundle.url(forResource: name, withExtension: "mom", subdirectory: modelDirectoryName) else { + fatalError("model version \(self) not found") + } guard let model = NSManagedObjectModel(contentsOf: url) else { fatalError("cannot open model at \(url)") } return model }