Upgrade to Swift 3 or higher from Swift 2 (XCode)

#1

Hi everyone :slight_smile:

I have a huge problem and I can’t find a solution for it on the internet.
I want to upgrade my Ionic project from Swift 2 to 3.
I have to in order to test it on an iOS device.

In XCode I get the error “Usupported Swift Version”:

I don’t know how to fix this. I googled so much and can’t get it to work. Ionic Info gives me:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 7.0.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2 
ios-sim    : 6.0.0 
Node       : v8.9.2
npm        : 5.6.0 
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b 

If anyone could help that would be awesome!

Thanks you :slight_smile:

1 Like
#2

I found the soltuion:
Open your Xcode project (see Ionic documentation on how to deploy to find out how).
Then click on the name of your project within Xcode (google how to access build settings), then click on build settings scroll down to swift and set the swift version to 3.2. Then it works.

1 Like
#3

solved with me by folllow plugin guide instruction

1 Like