18

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.

TiM
  • 15,812
  • 4
  • 51
  • 79
polarware
  • 2,499
  • 1
  • 24
  • 18

4 Answers4

17

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.

Morgan Wilde
  • 16,795
  • 10
  • 53
  • 99
  • 2
    Works for me too Using Xcode 7.0 beta 5 (7A176x) (latest beta at the time of writing). – Stephane Paquet Aug 06 '15 at 20:40
  • Don't work for Xcode 7.0.1: "mv: dyld_sim: No such file or directory" – ChikabuZ Oct 07 '15 at 20:45
  • The original link said the destination renamed file is **dyld_sim.orig**, not **dyld_sim.rig**. Which one? – Itachi Jun 15 '16 at 08:51
  • @Itachi makes no difference, you're renaming it so that it wouldn't be found. It can be `dyld_sim.whatever`. – Morgan Wilde Jun 17 '16 at 17:33
  • @MorganWilde I am facing the same issue for xcode 11 beta 6. Please refer the link https://stackoverflow.com/questions/57590075/getting-error-cdtool-cannot-compile0-on-xcode-11-beta-6 – iPhone Aug 21 '19 at 11:00
  • @ChikabuZ How did you resolve this issue because I am getting same error. Please refer this link: https://stackoverflow.com/questions/57590075/getting-error-cdtool-cannot-compile0-on-xcode-11-beta-6 – iPhone Aug 21 '19 at 11:17
  • @iPhone Sorry, I don't remember. But anyway please try with stable Xcode (10.3) – ChikabuZ Aug 21 '19 at 11:20
8

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

CodenameDuchess
  • 1,221
  • 18
  • 24
  • 1
    True, I had a similar problem with a fetched property, I think that this issue comes when there is something wring with the core data model. – Hola Soy Edu Feliz Navidad Aug 15 '16 at 18:37
  • 1
    This answer solved for me. I had deleted a relationship but didn't delete the inverse. This answer prompted me to do so... Thanks – ICL1901 Jan 06 '18 at 23:01
  • 1
    I had an issue with a duplicated association in my model after a Git merge. Fixing that solved this error. – Arvoreniad Jun 19 '18 at 02:04
2

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.

Chris Garrett
  • 4,824
  • 1
  • 34
  • 49
0

In my case, I got this error because of wrongly configured Constraints for properties. I'm not sure about what was wrong, but remove and re-add the constraints, the error disappear.

Obs: When i say constraints for properties, i'm telling about this:

enter image description here

Romulo BM
  • 671
  • 8
  • 16