Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SharedCode/ModelVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down