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

标签 ios objective-c cocoapods podspec

我正在尝试将一个用 Objective-C 编写的 pod 存储库发布到公共(public)空间。看起来一切正常,但是当我使用“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版本。 今天我的pod更新到1.1.0版本后,报错消失了,我的repo已经publish了,继承自UIButton的一个很小的Control,可以右显示button.image,左显示button.title github link

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

- 错误 | [iOS] 文件模式:'source_files' 模式不匹配任何文件。

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

关于ios - 发布 pod repo 遇到 "xcodebuild: Returned an unsuccessful exit code",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40124545/

相关文章:

ios - 这是洗牌的充分方法吗?

ios - svnx 没有显示路径部分并且解析也不起作用

ios - 使用服务器端身份验证为 oauth.io 调用提供状态(使用 iOS SDK)

ios - Xcode 7.2 - 在泄漏检测期间,应用程序未连接到互联网

ios - 使用 cocoapods 时,更改 PRODUCT_NAME 的最佳方法是什么?

ios - 错误 : CocoaPods's specs repository is too out-of-date to satisfy dependencies. 要更新 CocoaPods 规范,请运行:pod repo update

objective-c - iPad/iPhone 旋转时旋转 subview

ios - viewForHeaderInSection 滚动时消失

ios - 如何从其自己的 subview Controller 中解散模态 uitabbarcontroller

ios - 从子模块引用 pod 时“没有这样的模块”