[Appflow/Pro] SWIFT_VERSION cannot be empty in target MyApp

So I’m using Ionic App flow to build my project and distrbute my project and I’m getting this error SWIFT_VERSION cannot be empty in target MyApp

and I’m not sure WHERE to place this, I tried config.xml
<preference name="UseSwiftLanguageVersion" value="5" />

1 Like

Hi. You managed to solve this issue?

Did someone managed this error ?


This issue could be caused by any older plugins that require a specific version of SWIFT_VERSION. It would be be helpful to evaluate your plugins for any such.

If you are not sure, it might be worth to take a look at your project. I would encourage you to contact the Appflow support for further assistance.


1 Like


I had the same issue.
In your config.xml you ahve to place it in `<platform name"ios">:

 <platform name="ios">
        <preference name="UseSwiftLanguageVersion" value="5" />

Then in my case I had another plugin “cordova-plugin-photo-library” which required an old version of “cordova-plugin-add-swift-support”.

So I uninstall both plugin an reinstall first “cordova-plugin-add-swift-support” then “cordova-plugin-photo-library”.
And don’t forget to delete all plugins and platforms from your project. Then try to build.
It works for me.