ios Xcode keeps showing:-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.Any solution?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/55585062/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:51:31  来源:igfitidea点击:

Xcode keeps showing:-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.Any solution?

iosswiftfacebook-graph-apixcode10xcode10.1

提问by Jaseel.Dev

When I install facebook SDK pods into my ios project, It says ":-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'FacebookCore')"

When I install facebook SDK pods into my ios project, It says ":-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'FacebookCore')"

I am using swift 4.2 any solution?

I am using swift 4.2 any solution?

回答by Ravi Ojha

Change the podfile swift version like for any pod if you are getting this error like

Change the podfile swift version like for any pod if you are getting this error like

Select pods of your project

Select pod of your project

Select pod of your project

After then you follow the steps as described in the image and change the swift version for the pod next steps

After then you follow the steps as described in the image and change the swift version for the pod next steps

回答by Al Herrera

I am currently using Xcode 10.1. The "Targets" section is in another place of the interface.

I am currently using Xcode 10.1. The "Targets" section is in another place of the interface.

Xcode 10.1 screenshot

Xcode 10.1 screenshot

Beyond that, the Ravi Ojha solution works fine as well.

Beyond that, the Ravi Ojha solution works fine as well.

回答by HafizAnser

Follow these steps and change nay required pod version.enter image description here

Follow these steps and change nay required pod version.enter image description here

回答by rt_

The solution for me was to update from xcode 10.0 to 10.3 which supports Swift 5.0

The solution for me was to update from xcode 10.0 to 10.3 which supports Swift 5.0