I have a project for a cocoapod (let's call it "Main") which has a dependency with another cocoapod (let's call this one "Util").
I can add the Util in Main's Podfile via "pod 'Util'" and specify it as a dependency in the podspec via "s.dependency 'Util'"
As long as at least one of these are written, my test project for the pod runs fine (altho without the dependency in the podspec, running the "pod lib lint" command returns errors)
Specifying the pod in the Podfile allows me a lot more granularity as to how precise I want the version to be, even allowing me to use :head as a target. However, the dependency seems much more limited, requiring tags.
I would like to know the difference between these two approaches and if there are good practices to use when one pod depends on another (especially since I'd want to use Main as a pod for other projects eventually)
podspec
and editing thePodfile
? Most documentation I see online says you should edit yourPodfile
, but then I wonder what the point of thepodspec
is? – Shapeless