带有隐藏源的Pod文件(仅限框架)



你好,堆栈溢出用户。我试图创建里面没有源代码的pod。我读了很多教程,并试图遵循它们,但却出现了奇怪的错误。我有这个podfile.spec

Pod::Spec.new do |s|
s.name         = "sdkTEST"
s.version      = "0.0.1"
s.summary      = "A nice logger tool in Swift."
s.description  = "DESC"
s.homepage     = "https://github.com/test_user"
s.license      = { :type => "MIT", :file => "license" }
s.author       = { "Sergey" => "sergey@gmail.com" }
s.ios.deployment_target = '8.0'
s.ios.vendored_frameworks = 'sdkTEST.framework'
s.source            = { :http => 'https://github.com/LLTemp/test_sic_zip/raw/main/sdkTEST.zip' }
s.exclude_files = "Classes/Exclude"
end

但是当我打电话给时

pod lib lint 

我收到这个错误

- ERROR | [iOS] file patterns: The `vendored_frameworks` pattern did not match any file.

执行时

pod lib lint 

pod实际上没有从s.sourceurl下载源代码(imo这是bug(并使用本地版本的框架。您可以将*.framework文件放在库路径中,错误就会消失。

对于那些有兴趣在没有来源的情况下发布pod的人来说,还有一件事。要使用实际的pod,Podfile应该看起来像这个

target 'OpenSSLTest' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'OpenSSL-Universal'
pod 'test_sic', :podspec => 'https://raw.githubusercontent.com/LLTemp/test_sic/1.0.12/test_sic.podspec'  
end

注意使用:podspec,而不是:git:http

最新更新