The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
出現(xiàn)這個(gè)原因是 ,因?yàn)轫?xiàng)目使用了Cocopods确丢,項(xiàng)目是用低版本的Swfit 開發(fā)绷耍,在Xcode 升級(jí)后繼續(xù)開發(fā),這時(shí)導(dǎo)入新的庫(kù)是依賴高版本的Swift鲜侥。Cocopods 引入的庫(kù)都會(huì)有一個(gè)Swift版本褂始。
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
// 這就話的意思限定每個(gè)Pod都是在4.0下編譯