我正在創建一個專用窗格來處理我的項目中使用的所有常見代碼。這個私人吊艙在他的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