发布 pod repo 遇到 "xcodebuild: Returned an unsuccessful exit code"

publish pod repo encounter "xcodebuild: Returned an unsuccessful exit code"

我正在尝试发布一个在 Objective-C 到 public space 中写入的 pod 存储库。看起来一切正常,但是当我使用 "pod lib lint" 检查 podspec 文件时,出现以下错误:

- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE  | [iOS] xcodebuild:  xcodebuild: error: 'App.xcworkspace' does not exist.**
Pod::Spec.new do |s|
  s.name     = 'ImageRightButton'
  s.version  = '0.0.3'
  s.platform = :ios, '7.0'
  s.license  = 'MIT'
  s.summary  = 'Give a button with titlelabel in left and image in right'
  s.homepage = 'https://github.com/fizix100/ImageRightButton'
  s.author   = { 'fizix100' => 'fizix100@hotmail.com' }
  s.source   = { :git => 'https://github.com/fizix100/ImageRightButton.git',    :tag => s.version.to_s }

  s.description = 'Inherited from UIButton, the button has a BOOL property "isImageRight",
         when set this property as YES, the button can set its title in left and
         image in right'

  s.prefix_header_contents = '#import <UIKit/UIKit.h>'
  s.source_files = 'Classes/*.{h,m}'
  s.preserve_paths  = 'Example'
  s.requires_arc = true
end**

我正在使用:

CocoaPods 1.1.0.beta.2

Ruby ruby 2.0.0p648

Xcode 8.0

OS X 10.11.6

我用 "pod spec lint" 尝试了其他已发布的 podspec 文件(如 SVPullToRefresh),它们显示了同样的错误,所以我认为这个错误不是由我的规范格式引起的。这个问题折腾了我一整天,还没解决

谁能帮我解决这个问题?

这个问题已经解决,只是由于cocoapods版本1.0.1。 今天我的pods更新到1.1.0版本后,错误消失了,我的repo已经发布了,一个非常小的继承自UIButton的Control,可以显示右边的button.image和button.title左边github link

同时,我发现 pod 命令 "pod lib lint" 确实向我显示了一个错误的错误:

- ERROR | [iOS] file patterns: The 'source_files' pattern did not match any file.

但是命令 "pod spec lint" 通过了,我成功发布了它。 结论是 "pod lib lint" 出错了,它只是误导了我。