0

I want to upgrade my small project that has pod dependencies, as well as these pods to latest swift 5. I did convert, tested and all was fine. However, I have noticed that in some pods build settings there are two numbers of swift:5 and 4.2. This is illustrated in figure attached.

enter image description here

I have tried to set by hand the 4.2 to 5 in another smaller project and did not get any issue for the moment...

I wonder if someone can explain what is the difference of these swift language columns? Is the project swift version now on 4.2 or 5? Also, what are the safe steps to make both equal to latest 5?

Konstantinos
  • 101
  • 1
  • 9

1 Answers1

1

Try put these lines in your Podfile and run pod install again

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = "5"
        end
    end
end

target "YourProject" do ...

Also make sure your dependencies are compatible with Swift 5.

Duy Nguyen
  • 226
  • 1
  • 5
  • THank you for your response but this is what I have in my Podfile. – Konstantinos Apr 13 '19 at 06:33
  • From my opinion, your project was initialized with 4.2 and it keeps until now, sorry I don't know where this is stored. tThat also affected the pod when it first initialized. – Duy Nguyen Apr 14 '19 at 08:04
  • It seems to me too that the pods are initialized to 4.2... But the questions are a) what is this specific column purpose b) why it does not change with new pod install with setting as 5 (i.e. as you proposed) c) how we can make that change (e.g. by hardcoding that column?) and what the impact of that change. – Konstantinos Apr 14 '19 at 22:36