-
Podfile
作用:使用ruby语法编写的 "框架依赖描述文件"; 就是告诉cocoapods需要下载集成哪些框架 -
Podfile.lock
作用:记录着上一次下载的框架最新版本
一、pod install和pod update的区别
pod install
:从Podfile.lock读取架信息,下载安装;如果不存在Podfile.lock,从Podfile中读取,下载安装后,生成Podfile.lock。
pod update
:从Podfile中读取信息,安装后生成Podfile.lock。
Options:
--sources=https://cdn.cocoapods.org/ The sources from which to update
dependent pods. Multiple sources must
be comma-delimited
--exclude-pods=podName Pods to exclude during update.
Multiple pods must be comma-delimited
--clean-install Ignore the contents of the project
cache and force a full pod
installation. This only applies to
projects that have enabled
incremental installation
--project-directory=/project/dir/ The path to the root of the project
directory
--no-repo-update Skip running `pod repo update` before
install
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help
二、实际经验
多人开发中上传到共享库中的只有四个:
每个人把项目克隆下来后,执行pod install,目的: 是为了保证大家使用的第三方框架版本一致!!
如果以后大家需要统一升级第三方框架, 那么每个人在执行 pod update