Currently my project relies on many pods, adding pods makes my binary bigger, I'd like to inspect the pods I linked to and see which of them is the biggest, so that I could know which of them I should remove.
Any Idea?
Thanks.
~> (the optimistic operator) is used when you want to specify a version 'up to next major | minor | patch'. For example: ~> 0.1.2 will get you a version up to 0.2 (but not including 0.2 and higher)
First, go to your root directory (the directory with yourproject.xcworkspace) and type "cat Podfile". This isn't completely necessary, but will show you the dependencies, just so you have an idea.
Then type "cd Pods". This will bring you to the directory where the dependencies are stored. Next, type "du -h". This lists the size of each directory, and will give you a pretty good idea which pods are the largest.
you can use this tool from Google https://github.com/google/cocoapods-size
It gives you how much byte a specific pod's binary add to your binary.
It basically uses an empty app and does the before/after comparaison
Exemple:
./measure_cocoapod_size.py --cocoapods AFNetworking
// Output:
Size comes out to be 231568 bytes (measured at version 3.2.1)
You can even pass custom sources, or use the diff yourself on your app ;)
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