swift - 具有隐藏源的 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.source url 下载源代码(imo 这是错误)并使用您的本地版本的框架。您可以将 *.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
推荐阅读
- spring - 使用 Springboot Restful 服务向 elasticsearch 插入记录
- regex - 正则表达式匹配 2 个条件
- get - 在没有url的swift 4中从字符串的imageview中显示图像
- node.js - Azure AD - 用于管理 Azure 资源的令牌身份验证
- typescript - 关键对象前的加号是什么意思?
- python - 如何将设备映射和标签规范传递给 Boto3 Python run_instances
- spring - 仅测试许多春季批次中的一项工作
- c# - 具有多对多关系和 Automapper 的 HttpPost
- typescript - 如果块范围类型不通过泛型反映
- sql - PostgreSQL 将行转置为列