pod install 和 pod update的区别

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.

posted @ 2016-04-15 11:29  imKirin  阅读(3953)  评论(0编辑  收藏  举报