每次更新Podfile时,都必须解决这个SWIFT_VERSION错误。
如何将pod和swift版本设置为唯一,这样每次更新pod时都不需要修复SWIFT_VERSION错误。
Error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'paper-onboarding')由于操作系统的限制,X-Code最多允许快速运行4.2。
Swift 5.0将不支持,必须将其降至4.2版本才能兼容,并在模拟器或设备上运行应用程序。
发布于 2020-01-05 01:42:44
将其添加到Podfile中的pods定义下。在{pod-name}中插入所需的pod并设置所需的版本
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == '{pod-name}'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
endhttps://stackoverflow.com/questions/59591748
复制相似问题