cocoapods依赖关系可视化

转载

cocoapods管理的三方库之间有时候存在依赖关系,Podfile.lock藏满了各个版本库的版本号信息和彼此的依赖关系。

网页可视化导出-cocoapods-graph

终端安装插件:

1
sudo pip install cocoapods-graph

使用方式

进入到工程的根目录,执行:

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

图片可视化导出

终端安装插件:

1
2
sudo gem install cocoapods-dependencies
brew install graphviz

使用方式:
进入到工程的根目录,执行:

1
2
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.