On pod install
, I am getting warning like Found multiple specifications for "<Pod Name>"
It means that I have multiple Podspecs
in this directory ~/cocoapods/repo
Example Podfile:
source '<Private Podspec>'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'SDKDemo' do
use_frameworks!
pod '<Pod Name>'
end
My question is that
<Private Podspec>
, How it will work in this case source 'https://github.com/CocoaPods/Specs.git'
source '<Private Podspec>'
I came to conclusion like order of source will affect deciding the Podspec. But I want to clarify this.
On my side, that approach (changing the order of the sources) never worked.
I needed to specify the source for my private pod in order to make it work. The reason is that my private pod registered in my private specs repo has the same name than another one registered in the public cocoapods specs repo.
i.e.:
source 'https://github.com/CocoaPods/Specs.git' # public cocoapods specs repo
source 'https://github.com/{:user}/specs.git' # my private specs repo
platform :ios, '11.0'
target 'MyAppTarget' do
use_frameworks!
# any other public pod ...
pod 'PrivatePod', :source => 'https://github.com/{:user}/specs.git'
end
This is what solved my issue.
I had both source 'https://cdn.cocoapods.org/'
and source 'https://github.com/CocoaPods/Specs.git'
included in Podfile
source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs.git'
After removing source 'https://github.com/CocoaPods/Specs.git'
the warnings gone.
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