Friday, September 6, 2019

The “Swift Language Version” (SWIFT_VERSION) build setting error with project in Objective C

After adding Core Data to our Objective-C project and adding an Entity, the build started failing with the error:

The “Swift Language Version” (SWIFT_VERSION) build setting error with project in Objective C

It turns out that the default Code Generation language of Core Data is swift, even if the entire project is written in Objective-C.

To resolve the error, click on the added Entity and look at File Inspector.  There is a Code Generation section which you'll need to switch to Objective-C.  Alternatively you can add the SWIFT_VERSION in your build settings, but I could not find that in our project. (https://stackoverflow.com/questions/52950514/value-for-swift-version-cannot-be-empty)

Solution found on stack overflow: https://stackoverflow.com/questions/47743271/the-swift-language-version-swift-version-build-setting-error-with-project-in

No comments:

Post a Comment