我的Xcode中有错误:

SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.(in target 'SwiftyJSON')
SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Eureka')
SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'XLPagerTabStrip')我发现我应该升级我的快速语言版本,但是当我更新这个错误时会显示:


这是我的podfile内容:
platform :ios, '12.1'
target 'Questers' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Questers
pod 'SwiftyJSON'
pod 'TextFieldEffects'
pod 'Alamofire'
pod 'XLPagerTabStrip'
pod 'Eureka'
pod 'Charts'
pod 'Floaty'
pod 'SVProgressHUD'
pod 'iOSDropDown'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'MessageKit'
pod 'MessageInputBar'
target 'QuestersUITests' do
inherit! :search_paths
pod 'Firebase'
end结束
发布于 2019-04-04 10:04:01
将Xcode更新为10.2或手动在pod中设置版本,如下所示
pod 'Eureka', '~> 4.3.1'当您将pod保存在podfile中时,cocoapods会安装库的最新版本。在您的示例中,最新版本是用swift 5编写的,但是xcode不支持Swift 5,您必须设置用于安装lib的pod版本,并使用支持的版本Swift。
发布于 2019-04-03 10:01:10
这个错误清楚地表明Swift编译器5.0是为SwiftyJSON、'Eureka‘、'XLPagerTabStrip' pods设置的。
解决方案1:
简单地说
对所有3个吊舱目标重复第2-3步.
将pod特定的配置设置为podfile。
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Material'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end解决方案2:
如果吊舱使用SWIFT5.0语言特性,在这种情况下,上述解决方案将无法工作。因此,将您的XCode更新为包含SWIFT5.0API的10.2版本。或者从Swift 5.0手动下载工具链
https://stackoverflow.com/questions/55492096
复制相似问题