我制作了一个我想通过 CocoaPods 分发的框架。
我不确定我是否在做一些愚蠢的事情。我在基本目录中包含了一个完整的 .framework 文件夹,我希望它成为我的 pod 的来源。当我运行“pod lib lint”时,一切似乎都很好,但是当我运行“pod spec lint”时,我得到:
- ERROR | [iOS] The `vendored_frameworks` pattern did not match any file.
我在查看stackoverflow后尝试添加preserve_paths,但这似乎无法解决我的问题。通过阅读 cocoapods 文档, vendored_frameworks 是“Pod 附带的框架包的路径”,所以我认为在这里使用它似乎很好。
这是我的 podspec 文件:
Pod::Spec.new do |s|
s.name = "X"
s.version = "1.0"
s.summary = "Summary"
s.description = "Description here"
s.homepage = "http://www.valid_homepage.com/"
s.license = { :type => "Commercial", :text => "See https://www.license_here" }
s.author = { "Author" => "author@website.com" }
s.source = { :http => "https://storage.googleapis.com/path/to/file" }
s.social_media_url = 'https://twitter.com/handle'
s.platform = :ios, '7.0'
s.requires_arc = true
s.preserve_paths = 'X.framework'
s.vendored_frameworks = 'X.framework'
s.frameworks = 'SystemConfiguration'
s.library = 'resolv'
end
任何见解将不胜感激!谢谢!
.framework 目录具有结构
Framework
- Headers (Shortcut)
- LibraryFile (Shortcut)
- Versions
- A
- Headers (Contains .h file)
- LibraryFile
- Current (Shortcut to A directory)