【发布时间】:2017-01-23 15:52:52
【问题描述】:
我正在创建一个私有 pod 来处理我的项目中使用的所有常见代码。这个私有 pod 在他的 podspec 上有几个子规范,其中一个依赖于一个众所周知的公共 pod:AFNetworking。
在我的 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" => "me@myemail.com" }
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 中有此代码 “调整大小”子规范
source 'https://repositorywithmyprivatepodcode'
target 'TestProject' do
pod 'Square1/Resized'
end
但是我在运行pod install时遇到了这个错误
[!] Unable to find a specification for `AFNetworking` depended upon by `Square1/Resized`
我在这里缺少什么?
【问题讨论】:
-
rs.dependency和依赖之间是否存在=? -
不,不需要
=,你可以在这里看到guides.cocoapods.org/making/specs-and-specs-repo.html -
您找到解决此问题的方法了吗?
标签: objective-c cocoapods