Berend Hulshof
Berend Hulshof

Reputation: 1039

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

Lately I've started to take up a course for learning swift to devolp iOS OS X and Watch OS apps. I'm taking this course on udacity. The first step is to download a project and put it in a folder on your desktop. I had to open the app and then run it, which should've worked. But not for me somehow. I hit run and the following error showed up (this is the complete error log): enter image description here

enter image description here

Some poeple suggested that I should update my XCode but I already have. I currently have XCode 7.3! I'm quite new to this platform, that's also why I'm doing this course, so I don't really know what I have to do. Can someone please tell me what's going on here?

Upvotes: 1

Views: 5078

Answers (3)

Muhammad Ahmad
Muhammad Ahmad

Reputation: 398

I do everything restarts Xcode, rebuild Project, adding toolChains lock unlock them, so there are two possibilities first, maybe you install the beta version of Xcode

or try this, this work for me-> I tried to run a project in Xcode12/Swift4, while the project was written on Xcode8/Swift3 so I install Xcode version 11.7 and run this work for me. if you not done with 11.7 then install another version of Xcode and try the appreciated version May this help you

Upvotes: 0

Arun Gupta
Arun Gupta

Reputation: 2636

Delete derived data.

Windows->Projects->select your project and delete derived data

This worked for me for couple of projects which i downloaded from internet.

Upvotes: 1

Berend Hulshof
Berend Hulshof

Reputation: 1039

This is the result of a corrupted swift class. If you encounter a class looking similar to the following code:

Ôæ≠fiÔæ≠fiqcaJÔæ≠fihJ0ç硡ˇ2ç硡ˇ$5y$ġˇˇ% 7.ġˇˇÔæ≠fiÔæ≠fiP‚—ġˇˇfl‚ġˇˇ ˗ġˇˇ∞B‚ġˇˇÄ+€

Try to re-create the class or re-download it. This solved my problem and to me, it would look like the only solution possible for a corrupted class.

Upvotes: 2

Related Questions