Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude a pod from updating

Tags:

ios

cocoapods

I use Cocoapods. I have made some changes to a 3rd party library and if I run pod update, all those changes would get replaced. Running pod install does the same thing.

Is there a way to exclude a pod from updating? Or a way to install a single pod without affecting others?

like image 330
Isuru Avatar asked Jun 17 '14 07:06

Isuru


People also ask

How do you update a specific pod?

When you run pod update SomePodName , CocoaPods will try to find an updated version of the pod SomePodName, without taking into account the version listed in Podfile. lock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).

How do I remove a pod installation?

Just rm -rf that pod's folder, and remove the line from the Podfile. Then run pod install again.

How do I remove a pod from my Mac?

Find the pods file in Finder, then delete each of the individual pods (you'll notice they're missing the . h and . m files). Then pod update .

How do I remove a pod from terminal?

First, confirm the name of the node you want to remove using kubectl get nodes , and make sure that all of the pods on the node can be safely terminated without any special procedures. Next, use the kubectl drain command to evict all user pods from the node.


3 Answers

At last Found the Solution.

It will install pod without any repository update if you already have the library in the project,else will download

pod install --no-repo-update 

If you want to update specific libraries you can use :

pod update [POD_NAME...]
like image 87
Babul Prabhakar Avatar answered Oct 21 '22 09:10

Babul Prabhakar


I know this topic is pretty old but someone might come here after an answer, so here it is:

from https://github.com/CocoaPods/CocoaPods/pull/7524

--exclude-pods option to pod update command.

It allows to skip the update operation for specific pods.

like image 11
Gustavo de Paiva Caiafa Avatar answered Oct 21 '22 10:10

Gustavo de Paiva Caiafa


Yes, just specify the version you want to install, like if you want to keep using AFNetworking 1.3 and not upgrade to 2.*:

pod 'AFNetworking', '~> 1.3.2'
like image 7
rckoenes Avatar answered Oct 21 '22 09:10

rckoenes