How to build Ionic 4 app on iOS with Xcode 10.2?

When I try to build my Ionic 4 app on iOS with Xcode 10.2 I get an error:

The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for the targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.

Does this mean that the Xcode project generated during ionic build uses old settings?

I tried to change the language settings in the build settings editor, but then I get compile error from the project. Maybe because some plugins do not support newer versions of Swift?

The only way I got my app built is to downgrade Xcode to version 10.1 which supports Swift 3. But with this Xode version I cannot run the app on my iPhone, because this is already on iOS 12.2 and I get an error when I try to run the app.

What is the recommended way to solve these version problems?

I solved the problem by upgrading all Cordova plugins to their latest versions. There were some updates specially regarding the Xcode 10.2 compatability. So, my app compiles and runs on the device :slight_smile:

But one thing remains: The generated Xcode project is still configured for Swift 3. So, I have to change this manually in the build settings.

Is there any way to change this via configuration? Or do I have to wait for future releases to get a project that is configured for Swift 5?