gpt4 book ai didi

cocoapods - CocoaPod - `public_header_files` 模式与任何文件都不匹配

转载 作者:行者123 更新时间:2023-12-02 03:14:55 55 4
gpt4 key购买 nike

我在 Amazon s3 中存储了一个预编译的框架。 “pod spec lint”失败并出现以下错误。

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

使用详细选项运行它显示它正在从 s3 下载,但 Cocoapod 不是复制下载的框架,而是从 '~//Library/Caches/CocoaPods/Pods/External/' 目录复制框架。这原来是一个空框架。因此,“pod spec lint”失败并出现上述错误。

这是“pod spec lint”输出的相关部分

Http download
$ /usr/bin/curl -f -L -o /var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy/file.tgz https://s3.amazonaws.com/framework.ios.sdk/MyFramework.framework.1.0.tar.gz --create-dirs --netrc

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload Upload Total Spent Left Speed

100 67562 100 67562 0 0 74480 0 --:--:-- --:--:-- --:--:-- 74407

$/usr/bin/tar xfz/var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy/file.tgz -C/var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy 从复制 MyFramework /Users/xxx/Library/Caches/CocoaPods/Pods/External/MyFramework/01a6da9f1381e3dbc8db63de5409d451-2eea2
../../../../private/var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/CocoaPods/Lint/Pods/MyFramework

运行预安装 Hook

当我手动将框架复制到“~/Library/Caches/CocoaPods/Pods/External”目录时,验证通过。

这是 podspec 文件。

Pod::Spec.new do |s|

s.name = 'MyFramework'
s.version = '1.0'
s.summary = 'MyFramework'

s.description = 'MyFramework'
s.source = { "http"=> "https://s3.amazonaws.com/framework.ios.sdk/MyFramework.1.0.tar.gz"}
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.platform = :ios, "8.0"
s.source_files = 'MyFramework/Classes/**/*','MyFramework.framework/Headers/*.h'
s.ios.public_header_files = 'MyFramework.framework/Headers/*.h'
s.ios.vendored_frameworks = 'MyFramework.framework'
s.ios.frameworks = 'CoreGraphics', 'Foundation', 'MobileCoreServices', 'Security', 'SystemConfiguration', 'UIKit'


s.dependency 'AFNetworking', '~> 3.0'
s.dependency 'Mantle', '~>2.0.4'
s.dependency 'AWSCore'
s.dependency 'AWSS3'

end

podspec 文件中是否缺少任何内容。非常感谢任何帮助。

谢谢!

最佳答案

您的source_files 属性必须包含项目的源文件,例如

s.source_files = 'MyFramework/Classes/**/*.{h,m,c}'

并且您的public_header_files 必须引用项目中的 header ,而不是结果框架中的 header ,例如

s.ios.public_header_files =  'MyFramework/Classes/PublicHeaders/*.h'

关于cocoapods - CocoaPod - `public_header_files` 模式与任何文件都不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37581297/

55 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com