0

Currently, I have to migrate Xcode from 8.2.1 to 8.3.2 because one of my pos is on swift 3.1 when I Archive it gives me below error.

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

Kushal Maniyar
  • 846
  • 1
  • 8
  • 26
  • 1
    please provide as much information as possible. These issues are not easy to diagnose as you know, its even harder with limited information such as this – Scriptable Jun 23 '17 at 14:36

2 Answers2

0

The swiftc failed with exit code 1 message indicates that the compiler crashed due to an internal problem.

Highly doubts, that may indicate that there's some type of syntax error with your code because of swift 3.1.

Fares Benhamouda
  • 589
  • 8
  • 21
  • I found the solution https://stackoverflow.com/questions/26156561/xcode-6-0-1-command-applications-xcode-app-contents-developer-toolchains-xcoded 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. – Kushal Maniyar Jun 23 '17 at 15:16
0

I found the solution.

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.

Kushal Maniyar
  • 846
  • 1
  • 8
  • 26