1
votes

When I build with Xcode 8.2.1 I received this error:

enter image description here

Command /Volumes/SSD/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swiftc failed with exit code 1

I have cleaned the project, delete derived data, wait for the indexing processing files, close and reopen Xcode, restart computer and nothing.

There is no duplicated files.

Same error happens with other libraries not only Alamofire.

The error begin happening after merge a branch. Keeping in mind that, I have tried go to other old branch where it used to work but it doesn't work anymore, same error.

Any other required information let me know!

Thank you so much.

4
Delete your Pods directory and run pod install again. - allenh
Still the problem. - Eironeia

4 Answers

2
votes

Steps that I followed to make it work:

  • Delete derived data
  • Delete Pod folder and Podfile.lock
  • Delete inside the project:
    • AppName.xcodeproj/xcuserdata
    • AppName.xcworkspace/xcuserdata
    • AppName.xcworkspace/xcshareddata

Afterwards, pod install and surprisingly it works.

EDIT: Only working with emulator still having the error with the phone.

EDIT2: I redownload Xcode and now works normally. I keep without knowing the reason why brokes but it's now working.

0
votes

For me this was because i renamed some of the project directories. I had a ton of red files. To solve, I followed these steps: 1. click on the directory in project navigator where many files show as red 2. Under "Identity and Type" in the File Inspector (on the right side), click Containing directory 3. Select the new directories 4. Rebuild - command shift K, command B

0
votes

My error shows also the information that some file are used twice in the project. However the complete pointed to the same file with the exact same path.

I could resolve it by unchecking the files an recheck it again.

0
votes

just clean your build so type

cmd + shift + K