I am getting following error when i compile the application after adding the Alamofire using the CocaPods.
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Alamofire')
Podfile: pod 'Alamofire', '~> 5.0.0-beta.5'
I am following link to add Alamofire in my Swift 5 project
Xcode Version: 10.1
Swift 5 support for Xcode was added in version 10.2. To use Alamofire with Swift 5 you will need to update your Xcode version. Other suggestion is to downgrade your Alamofire version to 4.8.2 or change Swift version to 4.2 in pod settings.
Swift 5 version support in XCode 10.2. You can not use the beta version of Alamofire in XCode 10.1. To use Alamofire in XCode 10.1 version you can simply use this
pod 'Alamofire'
instead of
pod 'Alamofire', '~> 5.0.0-beta.5'
Hope this will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With