mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-15 13:43:43 +01:00
Fixed Xcode 9 beta 6 errors
This commit is contained in:
@@ -145,7 +145,7 @@ public final class XcodeDataModelSchema: DynamicSchema {
|
|||||||
public required init(modelName: ModelVersion, modelVersionFileURL: URL) {
|
public required init(modelName: ModelVersion, modelVersionFileURL: URL) {
|
||||||
|
|
||||||
CoreStore.assert(
|
CoreStore.assert(
|
||||||
FileManager.default.fileExists(atPath: modelVersionFileURL.path),
|
NSManagedObjectModel(contentsOf: modelVersionFileURL) != nil,
|
||||||
"Could not find the \"\(modelName).mom\" version file for the model at URL \"\(modelVersionFileURL)\"."
|
"Could not find the \"\(modelName).mom\" version file for the model at URL \"\(modelVersionFileURL)\"."
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -164,13 +164,12 @@ public final class XcodeDataModelSchema: DynamicSchema {
|
|||||||
|
|
||||||
return cachedRawModel
|
return cachedRawModel
|
||||||
}
|
}
|
||||||
CoreStore.assert(
|
if let rawModel = NSManagedObjectModel(contentsOf: self.modelVersionFileURL) {
|
||||||
FileManager.default.fileExists(atPath: self.modelVersionFileURL.path),
|
|
||||||
"Could not find the \"\(self.modelVersion).mom\" version file for the model at URL \"\(self.modelVersionFileURL)\"."
|
self.cachedRawModel = rawModel
|
||||||
)
|
return rawModel
|
||||||
let rawModel = NSManagedObjectModel(contentsOf: self.modelVersionFileURL)
|
}
|
||||||
self.cachedRawModel = rawModel
|
CoreStore.abort("Could not create an \(cs_typeName(NSManagedObjectModel.self)) from the model at URL \"\(self.modelVersionFileURL)\".")
|
||||||
return rawModel
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user