Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am getting this error on archive:

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.

error

like image 543
R_Developer Avatar asked Oct 02 '14 07:10

R_Developer


1 Answers

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.

  1. Open up your project and click on the projects root directory.
  2. Click the build settings tab.
  3. 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).

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

like image 175
Mark McCorkle Avatar answered Sep 22 '22 02:09

Mark McCorkle