Vinod
Vinod

Reputation: 675

Alamofire not working after upgrading (Swift/Xcode 8)

My earlier version of swift was in 2.2. I have updated Alamofire using different options like

  1. pod 'Alamofire', '~> 4.0'
  2. pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.5.0'

Whenever I open the workspace, it asks to convert to latest, I opted for swift 2.3. But the Xcode shows the errors below:

and inside Alamofire Cannot convert value of type 'SecTrustResultType' to expected argument type 'UInt32'

I have deleted the files under the folders ~/Library/Developer/Xcode/DerivedData and build again . Same errors display.

What may be the wrong thing I did ?

Upvotes: 1

Views: 1004

Answers (1)

Ashish Kakkad
Ashish Kakkad

Reputation: 23882

As per Alamofire documentation it will work only with :

CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.

I followed following steps and it's working fine :

Open your terminal -

  1. sudo gem update --system
  2. sudo gem install -n /usr/local/bin cocoapods --pre (It will install prerelease version 1.1.0.rc.3 because final version not came yet)
  3. pod setup
  4. pod repo update
  5. remove all pods of your project and install it again ( Comment pod names by # -> Do pod update and again by removing # -> Do pod update )

Upvotes: 4

Related Questions