Data Model Version Compiler (MOMC) Error - ios

Has anyone seen this and know how to fix it?
/Users/venerley/dev/Phase3-Dev-iOS-DB/WTInstrument.3/Persistence/DataBase/WTModel.xcdatamodeld:
Could not create bundle folder for versioned model at
'/Users/venerley/Library/Developer/Xcode/DerivedData/WirelessTouch-gmsbhbucobwnlqcijbkyknnkktuu/Build/Products/Debug-iphoneos/WirelessTouch.app/WTModel.momd'
This problem occurs when building for arm64 devices. Using Xcode Version 5.1 (5B130a) & iOS 7.1.1

not sure if this makes sense to anyone? however this error message turned out to be a red herring.
The problem was due to the use of libCorePlot-CocoaTouch.a not being built for arm64. When this was fixed the database problem disappeared too!
I would be interested to hear from anyone who can explain how/why the libCorePlot-CocoaTouch.a file could interfere with the compilation of the database.

Face the same problem
I just created new model with new name and copy all the entity from old model and paste in new model and deleted old model, it worked

Related

Reference to xml_****_**** is ambiguous

I have updated my Xcode to the latest version of 8.0
After the update, I am facing a new build error preventing me to run the project on the simulator.
The error is the below in DDXMLNode.m:
reference to 'XML_DOCUMENT_NODE' is ambiguous
I am using the XMPP framework as pods (pod 'XMPPFramework') so I still can't figure out a way to solve this.
Note that the project is working normally on the device and was working on both Device and Simulator with the previous Xcode Version.
I have tried to search the internet but I still didn't find any solution for this.
I tried to clean the project and delete everything in the DerivedData folder as well, but it didn't solve the issue.
Appreciate any help.
Actually I am posting this answer in case it may help someone in the future.
After searching a lot without finding any answer, I discovered the following:
There is a file called module.modulemap that contains 2 methods.
module libxml [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
module libxmlSimu [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
The first one is used for real devices, the other one for the simulator.
However, when building the app on the simulator, and for a reason that I didnt figure it out, tree.h is being duplicated and causing all these issue.
So what I made to be able to run the project on the simulator was to comment the first method so the app can build successfully.
NB: Don't forget to uncomment the method once you want to run the project again on the real device.
Hope this will help anyone who will face the same issue.
i have tried some way.
I search the word XML_DOCUMENT_NODE with a result here:
then replace every error with the left symbol. It turns out to be OK for me now.

Cannot add model version xcode 7.3

I've added new model version before in this project but for some reason I cannot add them now. When I right click on ****.xcdatamodeld and select "Add model version" from Editor menu. New version is showing up in Finder when I click "Show in Finder" but not under ****.xcdatamodeld nor in File Inspector??? I cannot add them manually under ****.xcdatamodeld as well.
I've added Apple Watch support in my project recently, in case if this information helps.
To be honest, I don't think I found a satisfactory answer but a few workarounds to what I think is a bug.
A solution here refers to incorrect directory structure, I did not give this a try as the xCode versions seem quite old but maybe it might help you: Issues with directory structure
This seems like a hack which worked for some, even in xCode 7.2
While none of these options worked for me, even quitting xCode, restarting Mac, I just had the beta 7.1 lying around, adding a new version worked perfectly and then I switched back to 7.3 to continue the rest.
To be honest, I don't think I found a satisfactory answer but a it solved my problem.i created a new project, in that project I did my model versioning(in latest xcode) and copied that model object in to my project.It works well.
Having just experienced watching nothing happen after selecting Add Model Version, I quickly found (stumbled upon) a solution that works. Credit goes to Shawn's hack link, in which Mundi points to the xcdatamodels.
Alt-select an xcdatamodel and then Show in Finder
Quit Xcode
In the Finder folder with all the versions, I found one version already existed (but wasn't showing in Xcode) with the version I had tried to make several times.
Delete this imposter!
Open Xcode and try Add Model Version
The new version was added.

Error when trying to run application after previously i deleted derived data Xcode 7.2

Hey I keep getting this error. I think its because earlier i deleted everything in derived data folder and now i get this error when i try to run my project this is a new little test project I'm doing for the apple watch does anybody know how to fix it? Thanks
I recognize this issue and I tried to restart Xcode, my computer, clear cache, clean etc when I also had this problem, without any luck. The only thing that got it working for me was to completely uninstall Xcode and remove all files. Check this post of how to do that.

Compilation failed for data model at path - xcode 6

In one of my project, I am using CoreData to store all local data and it was working absolutely fine till xcode 5.1.1. But with the upgrade to xcode 6, I started getting compilation error. The error looks like this:
/Users//Desktop/test/test/test.xcdatamodeld: Compilation failed
for data model at path
'/Users//Library/Developer/Xcode/DerivedData/test-bheksmasmjewxsejmxeyasvvhrer/Build/Products/Debug-iphonesimulator/test.app/test.momd/test.mom'
I tried searching SO for the issue, found some suggestions and implemented them in my project as well. But none of the suggestions worked for me and am left wondering "what the h**l this issue is. Any hint/suggestion/solution will be a great help right now.
Thanks
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.

Compilation failed for data model at path after upgrading Xcode

After upgrading to Xcode 4.3.2 I have started getting the following error when i do a build:
Compilation failed for data model at path '/Users/Administrator/Library/Developer/Xcode/DerivedData/AppName-ffeggcadwojrwacrwosvadafamrk/Build/Products/Debug-iphoneos/Data.momd/Data.mom'
This was not happening before the upgrade and if i check out the same project on machine running the previous version of Xcode it works fine. No Errors.
I have found a couple of similar posts here and here but none of the answers have helped at all. From the error message the file path it gives doesn't contain a file so i'm guessing its a property somewhere that i need to change but i just can't find it.
Please help, thanks.
EDIT: On further investigation, i can stop it from erroring if i remove certain entities from the data model file, we are currently using a large pre created sqlite file to load data so i could recreate the data model file but that would mean recreating the sqlite which would be a bit of a pain. Anyone know why certain entities cause this?

Resources