Skip to content

Commit a35a2a3

Browse files
keanmokagio
andauthored
Fix remainig momd usage (#24467)
Co-authored-by: Gio Lodi <[email protected]>
1 parent f28e3fb commit a35a2a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Classes/Utility/CoreData/CoreDataHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public extension CoreDataStack {
357357
}
358358

359359
private func migrateDatabaseIfNecessary(at databaseLocation: URL) throws {
360-
guard let modelFileURL = Bundle.main.url(forResource: "WordPress", withExtension: "momd"),
360+
guard let modelFileURL = Bundle(for: ContextManager.self).url(forResource: "WordPress", withExtension: "momd"),
361361
let objectModel = NSManagedObjectModel(contentsOf: modelFileURL) else {
362362
return
363363
}

0 commit comments

Comments
 (0)