简体   繁体   中英

How can change Swift 3 to 4 in Xcode 11.4

Current I am using Xcode11.4. I need to use Xcode 11.4 for iOS 13 frameworks but I cant build my old project in Xcode 11 Here is the error message

This workplace has projects that contain source code developed with Swift 3.x.This version of Xcode does not support building or migrating Swift 3.x targets
Use Xcode 10.1 to migrate the code to Swift 4

I tried to change Swift Language version to Swift 4 in all Pods. 在此处输入图像描述

But Some of the Pods is showing error like that

错误

How Can I fixed that error,Does I need to install Xcode 10.1 again?

There are 2 ways you can do the migration

  1. Use Xcode 10.1's migration tool to update your code-base directly to swift4 But this will still require manual pod update

  2. If your code-base is small, you can skip the hassle of downloading and installing of Xcode and could manually update code to swift 4 by refactoring.

Follow this tutorial, It is comprehensive enough for migration

In both Project and Target files -> "Build Settings" tab -> Swift Compiler Language ->Swift Language Version -> changing the Swift version from 4.0 to "Swift 5.0" worked for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM