pod trunk push时出现错误The podspec does not validate,如何排除?

新手上路,请多包涵

使用 pod trunk push 时遇到[!] The podspec does not validate.,而使用 pod spec lint --allow-warnings 则提示[!] 2 out of 2 specs failed validation.,这些错误一般是怎么造成的,怎么排除?

podspec内容如下:

Pod::Spec.new do |s|
  s.name         = 'ACSNetworking'
  s.version      = '1.0.0'
  s.summary      = 'On the basis of AFNetworking encapsulation.'
  s.description  = <<-DESC
                   On the basis of AFNetworking encapsulation, more convenient, more concise.
                   DESC
  s.homepage     = 'https://github.com/Hyosung/ACSNetworking'
  s.license      = 'MIT'
  s.authors      = { 'Stoney' => 'sy92710xx@gmail.com' }
  s.social_media_url   = 'http://weibo.com/sy4312xx'
  #'http://blog.csdn.net/sy431256wr'
  s.ios.deployment_target = '6.0'
  s.osx.deployment_target = '10.8'
  s.watchos.deployment_target = '2.0'
  s.requires_arc = true
  s.source       = { :git => 'https://github.com/Hyosung/ACSNetworking.git', :tag => s.version.to_s }
  s.source_files = 'ACSNetworking/**/*.{h,m}'
  s.ios.frameworks = 'MobileCoreServices', 'UIKit', 'CoreTelephony'
  s.osx.frameworks = 'CoreServices', 'AppKit'
  s.frameworks = 'Foundation', 'SystemConfiguration'
  s.dependency 'AFNetworking', '~> 2.6.0'
end

请大家帮忙看看,谢谢。

阅读 9.8k
1 个回答
新手上路,请多包涵

原因是我的target过低,而我引用的AFNetworking要求是iOS 7.0/OSX 10.9,所以就验证无法通过。
当错误信息比较简单的时候,我们可以使用--verbose来显示更多的调试信息,以便我们更快定位到错误。

pod spec lint NAME.podspec --verbose
pod trunk push NAME.podspec --verbose
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏