在私有pod上执行lint命令时出错“在验证期间遇到未知错误(没有将nil隐式转换为String)。”

时间:2017-07-05 09:01:30

标签: swift cocoapods private lint podspec

我正在创建一个私有pod取决于另一个私有pod,当我不添加任何依赖时,linter工作得很好但是当我添加依赖项并运行lint命令时它会给我错误

Encountered an unknown error (no implicit conversion of nil into String) during validation.

lint命令:

pod spec lint --private --sources=https://github.com/*****/****.git 

这是我的podSpec有什么问题,我应该怎么做才能解决这个问题?

Pod::Spec.new do |s|

s.name         = "****Framework"
s.version      = "1.0.0"
s.summary      = "Summary  ................."
s.homepage     = "https://github.com/****/****Framework"
s.description  = "Description ................."
s.license      = "Simplified BSD license"
s.author       = { "Nahla Mortada" => "nahla.mortada@****.com" }
s.platform     = :ios, "9.0"
s.ios.deployment_target = "9.0"
s.source   = { :git => "https://github.com/****/****Framework.git", :tag => s.version }
s.source_files = "****Framework/*.swift"
s.pod_target_xcconfig =  {
'SWIFT_VERSION' => '3.0',
}
s.requires_arc = true
s.dependency '****'

end

完全错误:

ERROR | [iOS] unknown: Encountered an unknown error (no implicit conversion of nil into String
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `from_file'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification/set.rb:45:in `specification'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source.rb:265:in `search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:347:in `create_set_from_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:317:in `find_cached_set'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:290:in `specifications_for_dependency'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:108:in `search_for'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:206:in `block in sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `sort_by'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:52:in `block in sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:69:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:51:in `sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:446:in `push_state_for_requirements'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:438:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:422:in `activate_spec'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:388:in `attempt_to_activate_new_spec'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:319:in `attempt_to_activate'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:137:in `process_topmost_state'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:78:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolver.rb:42:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:62:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:719:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:717:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:76:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:236:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `block in download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:301:in `block in perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:295:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:295:in `perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:79:in `validate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:64:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:53:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:53:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
) during validation.

1 个答案:

答案 0 :(得分:0)

尝试清除本地CocoaPods缓存,方法是运行rm -rf ~/.cocoapods,然后运行pod setup

您的podspec似乎有效,如果这不起作用,您应该尝试取消注释s.dependency并再次使用它,因为依赖项pod也可能是造成此崩溃的