This seems like something that should be done very easily. I don't know why I just can't seem to find a simple answer to that.
I am creating a pod library that has a pod dependency.
So in my .podspec
, I have a s.dependency 'SomePod', '~> 1.0'
. Since I am writing my library using SomePod
, I want the source files from it in order to import it and use it. Sure one way to do it is to have a PodFile in the repo and then pod install the SomePod
.
But is there some other way to download the somePod
dependency so that I can use it in my library? What is the best practice around that to have a clean structure?
FYI, I am using the Cookie Cutter library in order to generate all my project structure. What's left for me to do is download those podspec dependencies and avoid using Podfile and pod install since I already have a .xcworkspace generated from Cookie Cutter, so pod install won't like that and will go crazy.
Well you could handle the dependency management with other Tools (Carthage etc.) or simply on your own (git clone + project integration), but as you are already providing a podspec for your lib, why not just stick to cocoapods for third party lib integration?
This would be the typical approach for your setup, as you just need to write a simple Podfile, assure that SomePod is fetched with the same version as defined in podspec and call pod install.
Advantages:
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