18

I downloaded Xcode 7 beta 5, and I tried to compile my project with Xcode 7, and it worked. So, after that, I used Xcode 7 to develop my application, but now, I want to back to Xcode 6 but when I try to build my project, I have this issue :

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 11

Screenshot for error

What can I do to resolve that ?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
testa abalez
  • 1,042
  • 3
  • 13
  • 28

7 Answers7

47

With the same error when compile wikipedia-ios 5.0.

Clean the project, then recompile, it works for me.

ngn999
  • 620
  • 1
  • 10
  • 17
  • It seems to be the good way, I have other errors which I can solve, but I don't have anymore the error with exit code 11, thank you. – testa abalez Aug 27 '15 at 07:07
10

If cleaning the project & recompiling it doesn't work then

  • Quit XCode
  • Delete the /Library/Developer/XCode/Derived Data folder
  • Start XCode again and compile

Note: this error can happen when using XCode 6.x and XCode 7.x installed (and used) parallel.

Gergely Orosz
  • 6,475
  • 4
  • 47
  • 59
1

In my case my submodules were empty which would cause the compiler to crash a simple:

cd /project/file/path
git submodule init
git submodule update

Solved the issue.

kevinabraham
  • 1,378
  • 4
  • 28
  • 55
1

Shift + command + k works. It will remove the errors .Then compile, It worked for me.

0

Clean your project and compile again. Short cut keys: Shift + Command + k

0

The xctoolchain error can sometimes be caused by Xcode not finding the location of source files in a project that was moved or started by someone else who had a different project location in their own Finder.

If you're working on another project started by someone else such as a GitHub open source project, Xcode can mistake the location of the source files.

Xcode may think ViewController.swift is still in the project folder on the creator's desktop when it's actually on your own desktop. In this case some of your source files may be red because Xcode cannot find them.

  1. Go to the Xcode Identity Inspector on the right side and in the Identity and Type section you'll see the Location pulldown.

  2. Select a red missing file in the Project Navigator on the left.

  3. Make sure the Identity Inspector pulldown is set to 'Relative To Group'.

  4. Click the folder icon underneath to navigate to the real file location, select your file and click Choose. The Full Path will now reflect the correct location.

  5. Clean and rebuild.

Edison
  • 11,881
  • 5
  • 42
  • 50
-1

What worked for me

  1. Delete Application from iPhone or simulator.
  2. Clean Project
  3. Run again
Francescu
  • 16,974
  • 6
  • 49
  • 60