Upgrading to the latest version of CocoaPods?

I have problems installing Alamofire 4.0 in my project.

I have the latest version of Xcode running on Swift 3 , and when I try to install alamofire, I get about 800 compilation errors.

Apparently

CocoaPods 1.1. 0+ is required to build Alamofire 4.0. 0+

I looked at the version of CocoaPods that I have in the terminal, and it says that I'm on 1.0.1.

Starting the update does not work, I think, because CocoaPods 1.1 is in beta.

So I'm not quite sure how to update it where I need it. Does obsolescence not cause 800 compilation errors? Does this sound like some other problem?

+249
ios xcode swift cocoapods alamofire
Sep 14 '16 at 2:29
source share
12 answers

Run the following on your terminal to get the latest stable version :

 sudo gem install cocoapods 

Add --pre to get the latest preview release:

 sudo gem install cocoapods --pre 
+525
Sep 14 '16 at 4:39 on
source share

Open Terminal -> copy below command

 sudo gem install cocoapods 

The latest stable version of cocoapods will be installed.

after that you need to update the pod using the command below

 pod setup 

You can check the pod version using the following command

 pod --version 
+78
Jan 07 '17 at 6:14
source share

If you have enabled system integrity protection or any other permission write error that has been enabled by default since macOS Sierra was released, you should update CocoaPods by running this line in the terminal:

 sudo gem install cocoapods -n/usr/local/bin 

After installation, check the version of your module:

 pod --version 

You will get rid of this error:

 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory 

And he will install the latest CocoaPods:

 Successfully installed cocoapods-xxx Parsing documentation for cocoapods-xxx Installing ri documentation for cocoapods-xxx Done installing documentation for cocoapods after 4 seconds 1 gem installed 
+19
Jun 29 '18 at 14:08
source share

For users with a CocoaPods installation without sudo (i.e. you do not want to grant RubyGems administrator privileges), you do not need the sudo to update your CocoaPods installation:

 gem install cocoapods 

You can find out where the CocoaPods gem is installed:

 gem which cocoapods 

If it is in your home directory, you should definitely run gem install cocoapods without using sudo .

Finally, to check which CocoaPods you are currently using, type:

 pod --version 
+16
Dec 11 '17 at 18:22
source share

If you are using Homebrew, open a terminal and enter:

 brew upgrade cocoapods 

If this does not work, try:

 brew install cocoapods 
+13
Dec 24 '18 at 14:11
source share

The following are instructions for updating cocoapods:

  1. Open a terminal (Shortcut: Press cmd + space tab to open Spotlight, then text in terminal )
  2. Use the sudo gem install cocoapod s command . This will ask for a system password for security reasons, after which it sets up gems

Screen shot 1

  1. Now configure the pod module using the pod setup command. This will set up Cocoapods repo wizard.

Screenshothot 2

  1. You can check the version of cocoapods using the pod --version command.

Screen shot 3

+10
Jun 19 '18 at 6:47
source share

I tried updating and did not work. Finally, I had to completely remove (manually) cocoapods, cocoapods-core, cocoapods-try .. any other package using cocoa pods. Use this terminal command to display all packages: gem list --local | grep cocoa pods gem list --local | grep cocoa pods

After that, I also delete the folder. / cocoapods from the user's root folder.

+4
Sep 19 '16 at 12:15
source share

You can solve this problem simply by using the commands:

Firstly:

 sudo gem install cocoapods 

Desp: enter mac user password, now your cocoapods will be replaced with stable version.

if you cloned the repo, enter the following command:

 pod repo update 

close your xcode and run this command

 Pod install 
+3
Aug 16 '19 at 10:38 on
source share

It is a really quick & detailed solution.

Open Terminal and do the following to get the latest stable version:

 sudo gem install cocoapods 

Add --pre to get the latest preview release:

 sudo gem install cocoapods --pre 

In case of error

Try uninstalling and reinstalling:

 sudo gem uninstall cocoapods sudo gem install cocoapods 

Run after CocoaPods update

 sudo gem clean cocoapods 

After updating CocoaPods, you also need to update the Podfile.lock file in your project.

Go to your project directory

 pod install 
+2
Sep 16 '19 at 12:21
source share

the error can be resolved with the command sudo gem install cocoapods --pre

0
Feb 01 '19 at 12:20
source share
 First check cocoapods version like pod --version then update like sudo gem install cocoapods --pre after update you can also check cocoapods version. 

enter image description here

-one
Aug 21 '18 at 12:46
source share

I change the line "pod" Alamofire ',' ~> 4.0 '"to" pod' Alamofire ',: git =>' https://github.com/Alamofire/Alamofire ',: commit =>' 3cc5b4e '"after that in the terminal: "pod install --repo-update" and it works.

-5
Jun 18 '17 at 18:12
source share



All Articles