当pod lib lint成功时,ios-pod spec lint失败. ‘vendored_frameworks’模式与任何文件都不匹配

我制作了一个框架,我想通过 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)
弄清楚了.基本上,您分发的任何zip文件夹的文件夹结构必须在内部匹配搜索路径.就像您的目录结构是:

.podspec
Frameworks/
    - X.framework

哪里

s.vendored_frameworks = 'Frameworks/X.framework'

然后,当你解压缩http:资源时,它应该具有目录结构

Frameworks/
    - X.framework
相关文章
相关标签/搜索