Boon
Boon

Reputation: 41510

How to find out Cocoapods library dependencies?

When I run pod install, I am seeing libraries installed that are not specified in Podfile. Presumably these are the dependencies of the libraries specified. How do I go about finding out which library in Podfile causes a specific library to be installed?

For example, PureLayout is not specified in my Podfile, I would like to know what's in my Podfile that causes this to be installed.

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

Upvotes: 2

Views: 1026

Answers (1)

MaxGabriel
MaxGabriel

Reputation: 7705

If you open the Podfile.lock file, you can see the dependencies of a pod in the PODS section:

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)

This shows that KIF is requiring KIF/Core (a "subspec" in the Cocoapods parlance), and OCMockito is requiring OCHamcrest (a dependency on a completely separate Cocoapod).

Upvotes: 3

Related Questions