Reputation: 311
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
Upvotes: 3
Views: 1648
Reputation: 4376
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.
Upvotes: 7
Reputation: 1557
Update Xcode to 10.2 or download the latest Xcode, which support Swift 5.0. Its better to keep updated rather than using latest version of any library to an old Xcode version. From Xcode 10.2 it support Swift 5
Upvotes: 2
Reputation: 7669
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.
Upvotes: 2