iosobjective-ccocoapodspodspec

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


I'm trying to publish a pod repo writing in Objective-C to public space. It seems everything works well, but when I use "pod lib lint" to check the podspec file, following error appeared:

- 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**

I'm using:

CocoaPods 1.1.0.beta.2

Ruby ruby 2.0.0p648

Xcode 8.0

OS X 10.11.6

I tried the other published podspec files(as SVPullToRefresh) with "pod spec lint", they showed the same error, so I don't think this error was caused from my spec's format. This problem has waste me a full day, still unsolved.

Can anyone help me on this?


Solution

  • This problem has been resolved, just due to cocoapods version 1.0.1。 Today after my pods was updated to version 1.1.0, the error disappeared, my repo has been published, a very small Control inherited from UIButton that can show button.image on the right and button.title on the left github link

    Meantime, I found that the pod command "pod lib lint" did show a wrong error to me:

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

    but command "pod spec lint" passed and I successfully published it. The conclusion was that "pod lib lint" went error, it just misguide me.