框架头文件未包含在pod lib lint中

时间:2015-04-17 04:41:05

标签: ios cocoapods

我正在尝试添加要编译的toxav所需的VPX框架。我有我的pod规范文件:

Pod::Spec.new do |s|
 s.name             = "toxcore-ios"
 s.version          = "0.1.3"
 s.summary          = "Cocoapods wrapper for toxcore"
 s.homepage         = "https://github.com/dvor/toxcore-ios"
 s.license          = 'GPLv3'
 s.author           = { "Dmytro Vorobiov" => "d@dvor.me" }
 s.source           = {
  :git => "https://github.com/dvor/toxcore-ios.git",
  :tag => s.version.to_s,
  :submodules => true
 }

 s.platform     = :ios, '7.0'
 s.requires_arc = true

 s.source_files = 'toxcore/toxcore/*.{c,h}', 'toxcore/toxencryptsave/*.{c,h}', 'toxcore/toxav/*.{c,h}'
 s.public_header_files = 'toxcore/toxcore/*.h', 'toxcore/toxav/*.h'
 s.dependency 'libsodium', '~> 1.0.1'
 s.dependency 'libopus', '~> 1.1'
 s.ios.vendored_frameworks = 'VPX.framework'
 s.prepare_command = 'libvpx/build/make/iosbuild.sh'
end

对于它的价值,prepare_command创建VPX.framework。我尝试将VPX.framework文件添加到s.source_files和s.public_header_files,但是在运行pod lib lint时它们仍然会收到以下相同的错误。我甚至不确定是否有必要将其添加到 s.source_files s.public_header_files ,因为我相信 s.ios.frameworks 已经照顾好了吗?

toxcore/toxav/toxav.h:34:10: fatal error: 'vpx/vpx_image.h' file not found

2 个答案:

答案 0 :(得分:2)

本周我在新创建的pod中链接框架时遇到了同样的问题。您应该在使用lint时使用--use-libraries选项:

pod lib lint --use-libraries

将pod添加到主Cocoapods存储库或您自己的存储库时,也可以使用此选项。

pod repo push REPO_NAME POD_NAME.podspec --use-libraries

希望这有帮助!

答案 1 :(得分:2)

我想出了我的问题。 VPX框架路径如下所示:   的 VPX.framework /接头/ VPX / {files.h}

当我们使用vendored_frameworks时,它实际上只在头文件的 Header 文件夹下查找。所以相反,我们有了这个

VPX.framework / Headers / {look here}

在这种情况下,我必须将 vpx 下的文件移动到标题