Cocoapods:Podspec 验证,缺少头文件
Cocoapods: Podspec validation, missing header file
这是我的 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}'
这是我的 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}'