2

i was hoping i could run $pod install <podName> and be able to install ONLY that pod, but this doesn't seem to work. is there a way to accomplish this?

The install command has something that works in this very way (e.g. $pod update <podName>. Is there an install equivalent?

Julian B.
  • 3,605
  • 2
  • 29
  • 38
  • Why wouldn't you want to install some pods? In that case just remove them from podfile. – Stefan Salatic Apr 27 '15 at 16:56
  • Explain "doesn't seem to work", exactly what is the problem–in detail. – zaph Apr 27 '15 at 16:58
  • I don't want to install one of them because it is causing coocapods to fail. the URL which holds the framework seems to be down and this causes the install of any pod after it (itself included) to fail. i don't want to remove this pod because i do need it as well. it is a temporary fix until it is up again. – Julian B. Apr 27 '15 at 18:04
  • Just comment the framework which you don't want to download from podfile. Here I have given iCarousel as an example. Comment the iCarousel pod as follows: #pod 'iCarousel', '~> 1.8.1' then give pod install and run your app. Once the framework link got up then uncomment it and give another pod install to update that framework – Shanmugaraja G Apr 27 '15 at 19:05
  • I could do that but that would remove the entire framework from my project. which i don't want. I just want to omit that pod's installation but leave it as is. – Julian B. Apr 28 '15 at 00:33
  • Not clear what you trying to achieve. You want to prevent particular pod from updating and remain in current version? Just lock that pod in the version you want, if that is the case. – MadNik Dec 10 '15 at 04:40
  • http://stackoverflow.com/questions/26351086/how-to-update-a-single-pod-without-touching-other-dependencies Same question and lot of answers. – Mehul Chuahan Apr 01 '16 at 05:47
  • Clarification: our app has a bunch of pods. We have a nightly task that uploads dSyms, for this we require the Crashlytics pod _only_. So would be nice if we could choose (on our nightly CI job) to just install the Crashlytics pod. We solved it for now by creating a seperate scheme just for this. – Stijn Jun 04 '20 at 11:42

3 Answers3

4

Yes you can!

First use pod outdated find out which pod is outdated then you know which pod it is NOT, say for example, your AFNetworking is up-to-date.

Then use pod update AFNetworking and cocoapod will install your newly added pod without touching other pod(s).

BTW, I am using latest cocoapod 0.39 but I think this trick works for previous cocoapod version.

I also use this trick to delete the pod I don't use without touching other pods

Qiulang
  • 10,295
  • 11
  • 80
  • 129
2

No, Its not possible to install the specific pod.

Nilesh Patel
  • 6,318
  • 1
  • 26
  • 40
1

If you execute pod install command, no one of the already installed pod will be downloaded and installed again since there is the Podfile.lock. So, why are you asking that? If you try to run the pod install you'll see that for the already downloaded pods will appear Using pod instead of Installing pod

Luca D'Alberti
  • 4,749
  • 3
  • 25
  • 45