How to install specific pod without touching other dependencies

▼魔方 西西 提交于 2019-12-02 18:03:25
Imran

To Skip running pod repo update before install.Use

pod install --no-repo-update

To install a plugin without updating existing ones-> Add that plugin in your Podfile and use:

pod install --no-repo-update

To remove/update a specific plugin use:

pod update POD_NAME

Tested!

1) If you want to update single pod

pod update 'yourpodname'

2) if you want to install one pod without affecting another pod

pod install --no-repo-update

3)if you want to install/update specific version of pod

pod 'Stripe', '3.0'

4) if you want to install/update latest version of pod than

pod 'KCFloatingActionButton', '~> 2.1.0'

Here you can skip integration of the Pods libraries in the Xcode project(s) by using following command.

pod install --no-integrate

Pod install

Hope this help you.

At the time of writing, pod install will only install pods in the PodFile that haven't already been installed. The others will not be updated. This issue appears to have been solved by the CocoaPods project.

Here is another way of doing it. If you want to install newly added pod and don't want to update other dependancies you need to remove "~>" from all your pods you don't want to update. For example in case of AFNetworking

pod 'AFNetworking', '2.2.1'   instead of pod 'AFNetworking',~> '2.2.1' 

If you have your first "Podfile.lock" in your project folder, you just have to use

pod install

Your "Podfile.lock" has registered the version of your old pod so you don't need to do something else

Do not get confused just open up the existing file and added the numbers of pod file below the existing pods.

Further, go to terminal and open up your project and run command:

$ pod install

(This command will only add on the new pod without disturbing your existing pods)

pod repo update && pod update 'YOURPOD'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!