Reputation: 1721
before you mark this question as a duplicate, I checked this question
and it didn't work for me.
how to fix this error:
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'DropDown')
Upvotes: 7
Views: 11269
Reputation: 1721
In addition to the correct answer, I added this to my podfile.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
Upvotes: 0
Reputation: 104
After upgrading to Xcode 10.2 release make sure you reboot MacOS. I had the exact same problem and reboot helped.
Upvotes: 0
Reputation: 1761
For XCode 10.1, select your Pods File
-> Go to Build Settings -> Choose your Pod -> Search "Swift" -> Navigate to "Swift Language version" -> Set to desired language version.
Upvotes: 11
Reputation: 11242
You have code which was compiled on the new Xcode 10.2 or the beta version which supports Swift 5. Update your Xcode to the latest version.
Upvotes: 7