3

Xcode 10.1 (10B61) suddenly started failing with "Value for SWIFT_VERSION cannot be empty" This is very similar to Value for SWIFT_VERSION cannot be empty but the problem continues after going through everything there.

The project doesn't use Swift at all, and has been compiling for months with no problem. It last compiled two days ago and hasn't even been touched since. There's nothing about Swift version in the build settings, in fact, there's basically nothing about Swift at all there. Where else do you look to get rid of this?

Original Wombat
  • 107
  • 1
  • 3
  • 5

2 Answers2

2

Here - https://github.com/kiwi-bop/flutter_crashlytics/issues/22 - I found that you just need to create an empty swift file in your project. Then this warning goes away - even if you don't intend to use any swift code.

I right-clicked on a group in the file navigator, selected 'Add file...', chose 'Swift File', and then chose not to add a bridging header.

Seems to work.

Al.
  • 173
  • 1
  • 11
2

I found that after adding a Swift file to an Objective-C only project and building it, as shown in Al's answer, I could then remove the Swift file. The Xcode 10.1 project retained its SWIFT_VERSION build setting, and the build error did not reoccur.

  • In my case, the Swift file was added unintentionally when I added KissXML lib. I searched for ".swift" files using the filter and removed its reference. Thanks. – Masamoto Miyata Sep 30 '20 at 06:04