Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.xcdatamodel: cdtool cannot compile

This problem occurred right after the last update of OS X El Capitan 10.11 beta 6, Xcode 7 beta 4 compiles my projects with the error in .xcdatamodel file saying: cdtool cannot compile. I tried to compile the same projects on OS X Yosemite and with Xcode 7.0 beta 4 I get always the same compilation error. Any idea on how to clear this issue? I'd appreciate any help.

like image 493
polarware Avatar asked Aug 06 '15 07:08

polarware


3 Answers

One solution posted on the Apple developer forums is renaming a file within the iOS Simulator.

cd /Applications/Xcode-beta.app
cd Contents/Developer/Platforms/iPhoneSimulator.platform  
cd Developer/SDKs/iPhoneSimulator.sdk/usr/lib  
sudo mv dyld_sim dyld_sim.orig

Here's the original link.

like image 174
Morgan Wilde Avatar answered Nov 13 '22 04:11

Morgan Wilde


This solution unfortunately did not work for me. However, I had recently changed some tables around in core data. I found the culprit by looking at all of my relationships and their inverses. One of the inverses had a dead reference. Switched it to "no inverse" did a clean and was up and running again. Hope this helps someone else. enter image description here

like image 8
CodenameDuchess Avatar answered Nov 13 '22 04:11

CodenameDuchess


I got this error when I changed the name of a property that was being used in a fetched property predicate. (So the predicate could no longer compile)

Fixing the typo in the predicate and rebuilding the project fixed the error.

like image 2
Chris Garrett Avatar answered Nov 13 '22 04:11

Chris Garrett