【问题标题】:Cocoapods: Podspec validation, missing header fileCocoapods:Podspec 验证,缺少头文件
【发布时间】:2015-05-02 20:32:03
【问题描述】:

这是我的podspec

Pod::Spec.new do |spec|
  spec.name         = "appName"
  spec.version      = "0.1"
  spec.summary      = "Blah blah"
  spec.homepage     = "http://myCompany.com/"
  spec.license      = 'Apache 2.0'
  spec.author       = { "myName" => "me@myCompany.com" }
  spec.source       = { :git => 'ssh://myProjectUrl', :tag => '0.1'}

  spec.requires_arc = true
  spec.ios.deployment_target = '7.0'
  spec.source_files = 'source/Classes/**.*'

  spec.frameworks   = ['Foundation', 'UIKit', 'CoreGraphics', 'QuartzCore']

  spec.subspec 'Core' do |cs|
    cs.dependency 'libextobjc', '~> 0.4'
  end

end

当我打电话给pod spec lint

** BUILD SUCCEEDED **
-> myApp (0.1)
    - ERROR | [iOS] [xcodebuild]  myApp/source/Classes/MyAppDelegate.m:10:9: fatal error: 'MyViewController.h' file not found

Analyzed 1 podspec.
[!] MyApp did not pass validation.

问题是我完全不知道为什么它不起作用。所有源代码都在/Classes 文件夹中。我那里有子文件夹(例如/Classes/ViewControllers),可能路径错误..?

【问题讨论】:

  • 这肯定是通过文件夹进行递归搜索的问题。当我附加 /ViewControllers 一切正常。不过,这与其说是解决方案,不如说是一个修复。

标签: ios cocoapods podspec


【解决方案1】:

当我改变时它正在工作:

spec.source_files = 'source/Classes/**/*.{h,m}'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-14
    • 2015-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多