Cocoapods:Podspec验证,缺少头文件

时间:2015-03-02 13:12:04

标签: ios cocoapods podspec

这是我的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),也许路径错了..?

1 个答案:

答案 0 :(得分:0)

当我改变时它正在工作:

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