Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Crash on Swift 4 Conversion

Tags:

xcode

swift4

I have a project that I am working on in Xcode 9.1 that is currently a Swift 3 project. I get the warning from Xcode that prompts me to convert to Swift 4, but upon clicking it: Xcode crashes. Xcode also crashes when I go through Edit > Convert > To Modern Swift Syntax. I have tried restarting Xcode and my computer to no avail.

This issue only occurs in this project as I am able to convert other projects with no problems.

I have tried converting the Swift Language Version attribute in build settings to Swift 4.0, but I still get the warning.

The real kicker is that Xcode will crash but then not display the normal response to a crash (option to report to Apple, display the crash log, etc.)

What can I try to fix this? The project will still build, run, & archive but the warning is bothering my OCD.

like image 438
rcobelli Avatar asked Nov 12 '17 17:11

rcobelli


1 Answers

If you are using XCode 9.1 and your project contains Swift Playground, try removing it. They have fixed this bug in XCode 9.2.

like image 73
kl.woon Avatar answered Nov 18 '22 13:11

kl.woon