Couldn't find '.momd' file
I solved the problem this way (I don't fully understand why it's working though) :
- (NSManagedObjectModel *)managedObjectModel {
if (!_managedObjectModel) {
_managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil];
}
return _managedObjectModel;
}
Unable to load momd file in ios 9 iPhone 4 simulator
I was using many .xcdatamodel
files some of them get worked with Solution1 & some with solution 2
Solution 1:
- Delete App from simulator
- Delete
.xcdatamodel
from xcode & save it somewhere, & re add it. - Quit Xcode, Delete Derived data & Repoen XCODE.
Solution 2:
Delete App from simulator
Create new
.xcdatamodel
& copy all contains to new.xcdatamodel
file- Quit Xcode, Delete Derived data & Repoen XCODE.
Core Data: bundle.main.url Thread 1 fatal error
Looking at the screenshots, I suppose the name of the storage should be: CryptoGO. Try this:
guard let modelURL = Bundle.main.url(forResource: "CryptoGO", withExtension: "momd") else {
fatalError("Unable to Find Data Model")
}
How to Get Path of MOMD File in Core Data
Solved the problem a little while ago by looking at what files were in my resources folder and realizing they are .mom files rather than .momd files. So searching for the resource with the .mom file extension solved my problem.
Compilation failed for data model at path - xcode 6
Not sure if you ever resolved this issue, but I had the same issue after I erroneously versioned my data model. I found the steps below fixed my issue:
In Xcode locate your .xcdatamodeld file then click "Show in Finder" and delete the .xcdatamodel file that was not previously visible in Xcode or that was erroneously versioned.
Hope this helps you in some way, if you are still looking for answers.
Related Topics
Auto Layout to Dynamically Size Uilabel Width
Adding Background Image to Uilabel
How to Convert .Dae to .Scn Files in Scenekit
Extracting H264 from Cmblockbuffer
iOS How to Asynchronously Download and Cache Images and Videos for Use in My App
How to Make Sure API Requests Come from Our Mobile (Ios/Android) App
Profile Doesn't Match the Entitlements File's Value for the Application-Identifier Entitlement
How to Add Headerview in Uicollectionview Like Uitableview's Tableheaderview
Change Order of Read Items with Voiceover
Cagradientlayer Diagonal Gradient
iOS App Deployment Without Appstore
Create a Button Programmatically and Set a Background Image
Get Input Value from Textfield in iOS Alert in Swift
Set Background Gradient on Button in Swift
How to Round the Corners of a Button
How to Programmatically Check Support of 'Face Id' and 'Touch Id'