【问题标题】:How to find out Cocoapods library dependencies?如何找出 Cocoapods 库依赖项?
【发布时间】:2016-01-24 18:40:29
【问题描述】:

当我运行 pod install 时,我看到安装的库没有在 Podfile 中指定。大概这些是指定库的依赖项。如何找出 Podfile 中的哪个库导致安装特定库?

例如,我的 Podfile 中没有指定 PureLayout,我想知道我的 Podfile 中有什么导致它被安装。

Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Installing Bolts (1.6.0)
Installing CocoaLumberjack (2.2.0)
Installing PureLayout (3.0.1)

【问题讨论】:

    标签: xcode7 cocoapods


    【解决方案1】:

    如果你打开Podfile.lock文件,你可以在PODS部分看到一个pod的依赖:

    PODS:
      - KIF (3.3.0):
        - KIF/Core (= 3.3.0)
      - KIF/Core (3.3.0)
      - OCHamcrest (4.3.0)
      - OCMockito (2.0.1):
        - OCHamcrest (~> 4.0)
    

    这表明 KIF 需要 KIF/Core(Cocoapods 用语中的 "subspec"),而 OCMockito 需要 OCHamcrest(依赖于完全独立的 Cocoapod)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-26
      • 1970-01-01
      相关资源
      最近更新 更多