Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
How to solve it?
Please see the screenshot.
Best Answer
This problem occurs when the Swift optimization level is not set to None for Release. Set the value to None and the issue goes away.
Open up your project and click on the projects root directory.
Click the build settings tab.
Search for Swift Compiler - Code Generation and under Optimization Level make sure Release is set to None.
EDIT
After upgrading to Xcode 6.1 these instructions caused other issues when archiving (building for debug/device worked fine). Setting the optimization to Fastest allowed me to archive again. There are apparent issues with Swift compiling still (archiving specifically).
1 >I was using scrollview delegate methods in my project when i didn't set the UIScrollViewDelegate in my header file.
2 >The linker error was generated because I deleted the whole .xib file once but when I added a new .xib file and tried to link it that aroused this error.
To fix this error I had to make a new project and copied all my code in that new project.There may be an easier way to do this but this is what I did to fix it.
Best Answer
This problem occurs when the Swift optimization level is not set to None for Release. Set the value to None and the issue goes away.
EDIT
After upgrading to Xcode 6.1 these instructions caused other issues when archiving (building for debug/device worked fine). Setting the optimization to Fastest allowed me to archive again. There are apparent issues with Swift compiling still (archiving specifically).
Can't archive working 6.0.1 Swift project in Xcode 6.1 / Segmentation fault: 11
EDIT I was not able to fund the Build Settings tab, until I read this answer.
how to find the build settings tab