【发布时间】:2015-03-19 16:15:20
【问题描述】:
我正在使用 Cocoapods 0.36.0.beta.1
如果我的规范中有一个静态库 libssl.a,可在 TestSpec/Libs 中找到,并且我将它作为一个供应商库包含,它似乎没有链接到目标项目中
这是我的 podspec 文件:
Pod::Spec.new do |s|
s.name = "TestSpec"
s.version = "0.0.1"
s.summary = "Test"
s.homepage = "https://www.google.com"
s.author = { "Ciprian Caba" => "1@2.com" }
s.platform = :ios, '8.0'
s.requires_arc = true
s.source = { :git => "https://github.com/CocoaPods/CocoaPodsTest.git", :tag => s.version.to_s }
s.source_files = 'TestSpec/*.{h,c,m,swift}'
s.resource_bundles = {
'TestSpecBundle' => ['TestSpec/*.png']
}
# s.public_header_files = 'Pod/Classes/**/*.h'
s.frameworks = 'UIKit'
s.vendored_libraries = 'TestSpec/Libs/libssl.a'
s.libraries = 'ssl'
end
这是我的 Podfile
platform :ios, '8.0'
target 'TestApp' do
pod 'TestSpec', :path => '../TestSpec'
end
在目标项目中发生的情况是 libssl.a 文件被包含在内,Libs 文件夹的路径被添加到搜索路径中,但在 Build Phases 选项卡上没有与 a 文件进行链接。据我了解,这应该是因为 s.libraries = 'ssl'
经过将近一天的挣扎和测试,我无法理解自己做错了什么
我还创建了一个带有 test project 的仓库
【问题讨论】:
标签: xcode swift xcode6 cocoapods