How to Install the Alamofire 4.0 in Xcode 8.0

Cannot install Alamofire 4.0 in Xcode 8.0 Using CocoaPods

Since you have an outdated pod repo, pod install getting failed. First of all you have to update your pod master repo before running pod install. Follow the steps given to update your pod repo and resolve the pod error.

  • Go to Cocoa Pods repo folder (~/.cocoapods/repos) and delete master folder
  • Run pod update on terminal. This will take several minutes to update pod repo.
  • When update get finished, run pod install (if required).

Hope this would be useful for those who are getting similar error :)

Can I update Alamofire to version 4 and still support iOS 8 in my app?

No you can't Alamofire 4.0 requirements:

  • iOS and tvOS 9.0+, macOS 10.11.0+, watchOS 2.0+
  • Xcode 8.0+
  • Swift 3.0+

If you would like to use Alamofire on iOS 8 or macOS 10.9, use the latest tagged 3.x release which supports both Swift 2.2 and 2.3.

Reference

Alamofire Xcode 8 Swift 3 results in 786 compile errors

Upgrading to the latest Cocoapods (at the time of this answer: version 1.1.0.beta.2) via the command:

gem install cocoapods --pre
seemed to solve the issue for my circumstance.

Faced error during update Alamofire to version 4.0 for my old project

You need to:

  1. In your podfile update to: pod 'Alamofire', '~> 4.0'
  2. In your podfile update to: platform :ios, '9.0' (or higher)
  3. Change your deployment target in Xcode to iOS 9.0 or higher
  4. Do a pod update

Do I need to explicitly state which version of alamofire I want to install using cocoapods in xcode 9, swift 4

If you declare the following you will get the latest stable version:

pod 'Alamofire'

If you declare a version number you then you'll that version:

pod 'Alamofire', '~> 4.2.0'

More versions Alamofire in project and framework

To achieve this, you'd essentially have to fork IngenicoConnectKit, update the dependency and then build it yourself.

You'd probably also have to modify your fork of IngenicoConnectKit to support Alamofire 5, as it has a number of breaking changes.



Related Topics



Leave a reply



Submit