Alamofire: Integrating 4.0.0 using Cocoa pod, still Xcode asking to change to Swift 3

Created on 23 Sep 2016  路  5Comments  路  Source: Alamofire/Alamofire

I created new project in Xcode 8 .

Added library using Pod file. Run pod install. When I openeded workspace it asked me to update swift syntax. I did that.

It started giving me errors. Any idea ?. See Attached screenshots.
screen shot 2016-09-23 at 12 45 01 pm
screen shot 2016-09-23 at 12 44 43 pm

Most helpful comment

Ok I have fixed this issue. When you try this command sudo gem install cocoapods --pre, you will get error (MAC OS Captain 10.11.5)

 sudo gem install cocoapods --pre
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/xcodeproj

1) First step is uninstall cocoapods sudo gem uninstall cocoapods

2) Then run this command sudo gem install -n /usr/local/bin cocoapods --pre
prateeksharma$ pod --version
1.0.1

MacBook-Pro:~ patrik$ sudo gem uninstall -n /usr/local/bin cocoapods

Select gem to uninstall:
 1. cocoapods-1.0.1
 2. cocoapods-1.1.0.rc.2
 3. All versions
> 1
Successfully uninstalled cocoapods-1.0.1
MacBook-Pro:~ patrik$ pod --version
1.1.0.rc.2

All 5 comments

You must use CocoaPods 1.1.0 for Xcode 8 as noted in README: gem update cocoapods --pre

CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.

I tried , but by default. Its installing 1.0.1 only. I have used the above command

prateeks-MacBook-Pro:~ prateeksharma$ gem update cocoapods --pre
Updating installed gems
Nothing to update

this is the response.
Seems need to do something else to update cocoapods to beta version 1.1.0

i have the same issue!
ff5c8677-56e7-4a9c-93e0-5c51881c3a2e

Ok I have fixed this issue. When you try this command sudo gem install cocoapods --pre, you will get error (MAC OS Captain 10.11.5)

 sudo gem install cocoapods --pre
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/xcodeproj

1) First step is uninstall cocoapods sudo gem uninstall cocoapods

2) Then run this command sudo gem install -n /usr/local/bin cocoapods --pre
prateeksharma$ pod --version
1.0.1

MacBook-Pro:~ patrik$ sudo gem uninstall -n /usr/local/bin cocoapods

Select gem to uninstall:
 1. cocoapods-1.0.1
 2. cocoapods-1.1.0.rc.2
 3. All versions
> 1
Successfully uninstalled cocoapods-1.0.1
MacBook-Pro:~ patrik$ pod --version
1.1.0.rc.2

Build, Alamofire successfully in Xcode 8 and swift 3

Was this page helpful?
0 / 5 - 0 ratings