How to build Swift 3 project on Xcode 9?

前端 未结 5 1218
南方客
南方客 2020-12-14 06:10

Xcode 9 Release Notes says that Swift 3 compilation is supported:

One compiler for Swift 4 and Swift 3, Swift 4 and Swift 3 targets c

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 06:35

    I had same issue - (I installed pod which swift version was 3x and my project's swift version was Swift 4. So I got so many compiler errors. Later I changed the Swift version form 4 to 3.2 and tried to build project, again I got compiler errors. I think that happen because of I run pod install while my project was in Swift 4.)

    • First you need to change the "Swift language version" from build settings.
    • If you have installed any pod then changing only "Swift Language Version" won't help. You may need to run pod install for the project.

提交回复
热议问题