pod install 和 pod update的区别

pod install(下载并安装pod)

1,当pod file文件中有“增加pod,删除pod,修改pod”的操作之后使用。

2,pod install执行完之后会将已下载的依赖库的版本号添加进podfile.lock文件

3,pod install根据podfile.lock文件列出的已安装的pod的版本信息,只负责下载安装podfile.lock中不存在的pod,不会自动更新已安装的pod的版本。

pod update (更新已存在的pod)

按规则将podfile文件中的pod更新到最新版本。并将pod版本信息写入podfile.lock

pod install

This is to be used the first time you want to retrieve the pods for the project, but also every time you edit your Podfile to add, update or remove a pod.

  • Every time the pod install command is run — and downloads and install new pods — it writes the version it has installed, for each pods, in the Podfile.lock file. This file keeps track of the installed version of each pod andlocks those versions.
  • When you run pod install, it only resolve dependencies for pods that are not already listed in thePodfile.lock.
    • For pods listed in the Podfile.lock, it downloads the explicit version listed in the Podfile.lock without trying to check if a newer version is available
    • For pods not listed in the Podfile.lock yet, it searches for the version that matches what is described in the Podfile (like in pod ‘MyPod‘, ‘~>1.2‘)

pod outdated

When you run pod outdated, CocoaPods will list all pods which have newer versions than the ones listed in thePodfile.lock (the versions currently installed for each pod). This means that if you run pod update PODNAME on those pods, they will be updated — as long as the new version still matches the restrictions likepod ‘MyPod‘, ‘~>x.y‘ set in your Podfile.

pod update

When you run pod update PODNAME, CocoaPods will try to find an updated version of the pod PODNAME, 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).

If you run pod update with no pod name, CocoaPods will update every pod listed in your Podfile to the latest version possible.

时间: 2024-08-27 19:46:17

pod install 和 pod update的区别的相关文章

转载:使用 pod install 还是 pod update ?

转载:http://www.jianshu.com/p/a977c0a03bf4 介绍: 许多人开始使用CocodPods的时候认为pod install只是你第一次用CocoaPods建立工程的时候使用,而之后都是使用pod update,但实际上并不是那会事. 简单来说,就是: 1.使用pod install来安装新的库,即使你的工程里面已经有了Podfile,并且已经执行过pod install命令了:所以即使你是添加或移除库,都应该使用pod install. 2.使用pod updat

CocoaPods 1.0之前版本无法pod install和pod update! 更新后CocoaPods 1.1.1 Podfile新的写法.

#ios必须小写 注:'eee'是工程name platform :ios, '8.0' #target对应的是项目名do执行开始 target'eee'do pod'MBProgressHUD' end #end结束

【laravel54】composer install与composer update的区别

1.基础概念: 我们需要明白laravel项目里面有2个配置文件,composer.json和composer.lock文件,前者是下载的依赖包配置文件,后者是锁定的包版本信息. 使用之前,需要cd 进入项目根目录:执行>>> 2.composer install:会优先调用下载composer.lock文件里面的类库版本,与线上库类一致:默认下载至vendor目录.(建议) composer update:会直接下载composer.json里面依赖包最新版本,并同步更新compose

pod install/pod update更新慢的问题

最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少.加参数的命令如下: pod install --verbose --no-repo-update pod update --verbose --no-repo-update 或者 pod install --no-repo

CocoaPods pod install/pod update更新慢的问题

最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少.加参数的命令如下: pod install --verbose --no-repo-update pod update --verbose --no-repo-update

iOS CocoaPods pod install/pod update更新慢的问题

最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少.加参数的命令如下: pod install --verbose --no-repo-update pod update --verbose --no-repo-update 另外,大部分的pod库都在github上面,所以

pod update或者pod install很慢

最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少.加参数的命令如下: pod install --verbose --no-repo-update pod update --verbose --no-repo-update

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

出现这样的错误: error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 具体如图: 我按照提示在终端打开工程,pod install 和 pod update 都试了一遍,然并卵.只好拿出杀手锏: Project -> Info -> Configurations -> Debug 改为 Pods.debug, Re

CocoaPods详解之----使用篇 pod install/pod update更新慢的问题

作者:wangzz 原文地址:http://blog.csdn.net/wzzvictory/article/details/18737437 转载请注明出处 如果觉得文章对你有所帮助,请通过留言或关注微信公众帐号wangzzstrive来支持我,谢谢! 经常遇到的问题::: 1. 最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的