cocoapods常用指令

  • 查看三方框架仓库源:pod repo
CLD:~ caolaidong$ pod repo

master
- Type: git (master)
//Specs Github项目地址,就是那个好多文件夹的目录
- URL:  https://github.com/CocoaPods/Specs.git
//本地好多文件夹目录的路径
- Path: /Users/caolaidong/.cocoapods/repos/master
1 repo
CLD:~ caolaidong$
  • 移除仓库源
    pod repo remove master

  • 添加仓库源
    pod repo add master http://git.oschina.....略....git

  • pod框架索引缓存路径search_index.json
    ~/Library/Caches/CocoaPods/
    如果发现框架信息本地已经缓存,但是无法搜索框架,可以删除这个索引文件重新生成即可课(执行pod search)

  • pod命令安装路径
    /usr/local/bin

  • pod安装路径

 which pod
/Users/caolaidong/.rvm/gems/ruby-2.4.1/bin/pod
  • pod update podName
    更新指定的三方库

  • pod install
    会根据Podfile.lock文件中列举的版本号来安装第三方框架,如果一开始Podfile.lock文件不存在, 就会按照Podfile文件列举的版本号来安装第三方框架.如果没有指定版本号会安装最新版本的框架.

  • pod repo update

pod repo update
Updating spec repo `master`
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master fetch origin
  --progress
  remote: Enumerating objects: 321, done.
  remote: Counting objects: 100% (321/321), done.
  remote: Compressing objects: 100% (114/114), done.
  remote: Total 422 (delta 231), reused 269 (delta 202), pack-reused 101
  Receiving objects: 100% (422/422), 53.05 KiB | 28.00 KiB/s, done.
  Resolving deltas: 100% (258/258), completed with 104 local objects.
  From https://github.com/CocoaPods/Specs
     3f6974460dc..1bcf79b1082  master     -> origin/master
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master rev-parse
  --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master reset --hard
  origin/master
  HEAD is now at 1bcf79b1082 [Add] RKJBluetooth 0.1.4
CLD:~ caolaidong$ pod setup
  • 初始化(下载服务器中所有第三方框架信息spec,缓存到电脑本地)
    pod setup
pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master fetch origin
  --progress
  remote: Enumerating objects: 15, done.
  remote: Counting objects: 100% (15/15), done.
  remote: Compressing objects: 100% (9/9), done.
  remote: Total 9 (delta 6), reused 0 (delta 0), pack-reused 0
  From https://github.com/CocoaPods/Specs
     1bcf79b1082..cd996f084e6  master     -> origin/master
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master rev-parse
  --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/caolaidong/.cocoapods/repos/master reset --hard
  origin/master
  HEAD is now at cd996f084e6 [Add] MCPlayerKit 0.1.4
Setup completed
CLD:~ caolaidong$

pod --version
ruby -v
gem --version

你可能感兴趣的:(cocoapods常用指令)