cocoapods依赖关系导出

Posted by Lazy Blog on December 27, 2018

iOS组件化系列

  1. 《使用Cocoapods创建私有podspec》

  2. 《使用Cocoapods 踩过的坑》

  3. 《定时取源码执行pod lib lint校验》
  4. 《cocoapods依赖关系导出》

  5. 《iOS 组件二进制》

cocoapods依赖关系导出

其实Podfile.lock藏满了,各个版本库的版本号信息和彼此的依赖关系。

cocoapods-graph

Installing

1
[sudo] pip install cocoapods-graph

How to use

1
cocoapods-graph -f Podfile.lock --html

cocoapods-graph

Installing

1
2
$ [sudo] gem install cocoapods-dependencies
$ brew install graphviz

Usage

1
$ pod dependencies [PODSPEC] [--graphviz] [--image]

Use the –graphviz option to generate .gv or Podfile.gv containing the dependency graph in graphviz format.

Use the –image option to generate .png or Podfile.png containing a rendering of the dependency graph.

[!] Note that for either graphviz or image output, GraphViz must be installed and dot must be accessible via $PATH.

输出

html ,图片,文本。应有尽有。

参考

  1. cocoapods-graph
  2. cocoapods-dependencies