Ios Cocoapods:Podspec验证,缺少头文件
这是我的Ios Cocoapods:Podspec验证,缺少头文件,ios,cocoapods,podspec,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" =>
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
),可能路径错误。当我更改时,它正在工作:
spec.source_files = 'source/Classes/**/*.{h,m}'
通过文件夹进行递归搜索肯定会有问题。当我连接了/ViewControllers后,一切正常。不过,这与其说是解决方案,不如说是解决方案。