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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With