'How do I add a private pod as a dependency in my podspec?
I have a PodA which has a dependency on PodB. I made both PodA and PodB myself and I pushed them to two separate repos, and also their podspecs into a single shared podspec repo.
In the podspec for PodB, I want to add PodA as a dependency, so I included the following line in PodB's podspec file:
spec.dependency 'PodA', '~> 0.1.0'
I also include the source in PodB's pod file and also add is as a dependency:
source '[email protected]:PodASourceHere.git'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PodB' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for PodB
pod 'PodA', '~> 0.1.0'
end
However when I run pod lib lint on PodB I get the following error:
ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for `PodA (~> 0.1.0)` depended upon by `PodB`
I read about another command "pod repo push", is this necessary for cocoapods to detect the actual pod name "PodA" in PodB's podspec? Will this expose PodA to the public for use? Is this the only way to include private pods as dependencies?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
