我正在尝试安装pod for Analytics。如果我只在Podfile中有Analytics pod,它会成功安装pod。 Podfile如下:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TestSDK' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
pod 'Analytics'
end
但是如果我在同一个Podfile中为另一个pod添加私有源,则会出现上述错误。新的Podfile如下:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'XXXXXX Private Repo XXXXXX'
target 'TestSDK' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
pod 'Analytics'
pod 'pod_from_the_private_repo' , '=1.0.0'
end
上面的Podfile成功安装了pod_from_the_private_repo,但它显示了仅在之前的情况下成功安装的Analytics的错误。
答案 0 :(得分:0)
配置应如下所示:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
# Private pods Spec repository
source 'https://path to your private repo'
# Public spec repository
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'ProjectName' do
# Pods for ProjectName
pod 'Crashlytics'
# Private pods
end