我正在创建一个专用窗格来处理我的项目中使用的所有常见代码。这个私人吊舱在他的podspec有几个子配置,其中一个取决于一个众所周知的公共吊舱:AFNetworking。无法找到[PRIVATE POD]依赖的[PUBLIC POD]的规范
在我podspec我有这个
Pod::Spec.new do |s|
s.name = "NAME"
s.version = "0.0.1"
s.summary = "SUMMARY"
s.description = "DESCRIPTION"
s.homepage = "https://myhomepage.com"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Me" => "[email protected]" }
s.platform = :ios, "8.0"
s.source = { :git => "https://repositorywithmyprivatepodcode", :tag => s.version }
s.subspec 'Core' do |cs|
cs.source_files = "Source/Core/**/*.{h,m}"
end
s.subspec 'Resized' do |rs|
rs.source_files = "Source/Resized/**/*.{h,m}"
rs.dependency 'NAME/Core'
rs.dependency 'AFNetworking' , '~> 3.0'
end
s.subspec 'UI' do |us|
us.source_files = "Source/UI/**/*.{h,m}"
end
end
我对项目的Podfile在那里我试图用 “调整大小” subspec
source 'https://repositorywithmyprivatepodcode'
target 'TestProject' do
pod 'Square1/Resized'
end
但我这个代码m运行时出现此错误pod install
[!] Unable to find a specification for `AFNetworking` depended upon by `Square1/Resized`
我在这里失踪了什么?
'rs.dependency'和依赖项之间是否存在'='? – Larme
不,不需要那个'=',正如你在这里可以看到的那样https://guides.cocoapods.org/making/specs-and-specs-repo.html – WedgeSparda