Is it possible to install a specific pod?

2019-07-18 17:32发布

问题:

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?

回答1:

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



回答2:

No, Its not possible to install the specific pod.



回答3:

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