我正在亚马逊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 /&#39复制框架;目录。事实证明这是空框架。因此," pod spec lint"因上述错误而失败。
以下是" pod spec lint"的相关部分。输出
Http下载
$ / 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
运行预安装挂钩
当我手动将框架复制到'〜/ 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文件中是否有任何遗漏内容。非常感谢任何帮助。
谢谢!
答案 0 :(得分:1)
您的source_files
媒体资源必须包含项目的源文件,例如
s.source_files = 'MyFramework/Classes/**/*.{h,m,c}'
您的public_header_files
必须引用项目中的标题,而不是结果框架,例如
s.ios.public_header_files = 'MyFramework/Classes/PublicHeaders/*.h'
答案 1 :(得分:0)
我不知道它是否相关,但正在运行pod cache clean --all
帮助了我。