Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all dependencies used by a particular dependency in a Podfile

Tags:

For example, my Podfile has

pod x
pod y
pod z

When I run pod install, it installs 'a', 'b', and 'c', in addition to 'x', 'y', and 'z'. If I want to find out where 'a' comes from, (is it from 'x' or 'y' or 'z', or do they share), how do I find out?

like image 418
mobjug Avatar asked Jan 14 '15 23:01

mobjug


People also ask

What is the Podfile checksum?

SPEC CHECKSUMS: To make sure that your pods have the same version as the Podspec, CocoaPods makes a checksum of the JSON representation of your Podspec. For a particular pod, after running pod install, if the checksum is different from the podfile. lock, it means that the pod has an updated version.

How do I check pod dependencies?

You could also look at the dependencies of specific specs by running pod spec cat AFNetworking . This will print the contents of the most recent AFNetworking. podspec. json and you can see under the dependencies JSON keys what it depends on.

How do I update pod dependency?

Use pod install to install new pods in your project. Even if you already have a Podfile and ran pod install before; so even if you are just adding/removing pods to a project already using CocoaPods. Use pod update [PODNAME] only when you want to update pods to a newer version.


1 Answers

After you run pod install you can look in your Podfile.lock. Here you should see entries indented under other entries. The indented entries are dependencies of the top level entries. For example:

- AFNetworking (1.3.4)
- ISO8601DateFormatter (0.7)
- Mantle (1.3.1):
  - Mantle/extobjc (= 1.3.1)
- Mantle/extobjc (1.3.1)
- OctoKit (0.5):
  - AFNetworking (~> 1.3.3)
  - ISO8601DateFormatter (~> 0.7.0)
  - Mantle (~> 1.3.1)
  - ReactiveCocoa (~> 2.2.2)
- ReactiveCocoa (2.2.4):
  - ReactiveCocoa/Core (= 2.2.4)
  - ReactiveCocoa/no-arc (= 2.2.4)
- ReactiveCocoa/Core (2.2.4):
  - ReactiveCocoa/no-arc
- ReactiveCocoa/no-arc (2.2.4)

Here Mantle is a dependency of OctoKit and Mantle/etcobjc is a dependency of Mantle (although this is a subspec).

You could also look at the dependencies of specific specs by running pod spec cat AFNetworking. This will print the contents of the most recent AFNetworking.podspec.json and you can see under the dependencies JSON keys what it depends on. In this case you may have to look at the subspecs to see what they depend on as well.

like image 143
Keith Smiley Avatar answered Oct 02 '22 05:10

Keith Smiley