Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 'xcodebuild: Returned an unsuccessful exit code' after trying publishing Pod

Command 'pod trunk push --verbose' outputs the following:

Build settings from command line:
CODE_SIGN_IDENTITY = -
SDKROOT = iphonesimulator10.1

=== CLEAN TARGET GTNetworkQualityChecker OF PROJECT Pods WITH CONFIGURATION Release ===

Check dependencies
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Stack:
  0   __exceptionPreprocess (in CoreFoundation)
  1   objc_exception_throw (in libobjc.A.dylib)
  2   -[__NSArrayM insertObject:atIndex:] (in CoreFoundation)
  3   -[XCCompilerSpecificationIBStoryboardLinker _outputNodesForInputNodes:withMacroExpansionScope:] (in DevToolsCore)
  4   -[XCCompilerSpecificationIBStoryboardLinker doSpecialDependencySetupForCommand:withInputNodes:withMacroExpansionScope:] (in DevToolsCore)
  5   -[XCCommandLineToolSpecification createCommandsforInputs:withMacroExpansionScope:] (in DevToolsCore)
  6   -[PBXTargetBuildContext invokeTask:forInputs:withMacroExpansionScope:optionTable:] (in DevToolsCore)
  7   -[XCDependencyGraphCreationContext invokeTask:forInputs:withMacroExpansionScope:optionTable:] (in DevToolsCore)
  8   -[XCCompilerSpecification computeDependenciesForInputNodes:ofType:variant:architecture:outputDirectory:withMacroExpansionScope:] (in DevToolsCore)
  9   -[XCCompilerSpecification computeDependenciesForFilePath:ofType:outputDirectory:withMacroExpansionScope:] (in DevToolsCore)
 10   -[XCBuildRuleDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:withOutputDirectory:parameterMacros:withMacroExpansionScope:] (in DevToolsCore)
 11   -[XCBuildRuleDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:withOutputDirectory:parameterMacros:withMacroExpansionScope:] (in DevToolsCore)
 12   -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope:processedPaths:] (in DevToolsCore)
 13   -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:usingBuildRule:withMacroExpansionScope:] (in DevToolsCore)
 14   -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:withMacroExpansionScope:] (in DevToolsCore)
 15   -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope:] (in DevToolsCore)
 16   -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesWithMacroExpansionScope:] (in DevToolsCore)
 17   -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 18   -[XCProductTypeSpecification computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 19   -[XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesWithMacroExpansionScope:] (in DevToolsCore)
 20   -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)
 21   -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)
 22   -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)
 23   -[XCBlockQueue _processNextBlockInThreadSlotNumber:] (in DevToolsCore)
 24   -[XCBlockQueue _processBlocksInThreadSlotNumber:] (in DevToolsCore)
 25   __NSThread__start__ (in Foundation)
 26   _pthread_body (in libsystem_pthread.dylib)
 27   _pthread_body (in libsystem_pthread.dylib)
 28   thread_start (in libsystem_pthread.dylib)

 -> GTNetworkQualityChecker (0.1.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.

[!] The spec did not pass validation, due to 1 error.

I've Xcode 8.1, Cocoapods v 1.2.0. Pod's repository is here.

Could anybody tell me reason of that problem and how It may be fixed?

like image 213
ArtStyle Avatar asked Apr 03 '17 20:04

ArtStyle


2 Answers

The problem comes down to this line in your podspec:

s.source = { :git => 'https://github.com/Ar7Style/GTNetworkQualityChecker.git', :tag => s.version.to_s }

The :tag is the problem. Your current pod validation doesn't know which commit represents the definitive end of what you want to release, which would be your "0.1.0" version. That's why the validation step is referring to an older version of your repo (where you did have FrameworkStoryboard.storyboard existing before you deleted it).

In other words, you need to tag your Pod with a tag that corresponds to your version number.

For example, at the command line:

git tag '0.1.0' # the version number you're using for this release
git push --tags

Then do the validation step that I showed you up above:

pod spec lint --verbose GTNetworkQualityChecker.podspec

And if it passes, then you should do your pod trunk push --verbose.

like image 101
Michael Dautermann Avatar answered Oct 14 '22 18:10

Michael Dautermann


This error may occur when u setting up incorrect path to your sources. Check it one more time. It should be something like:

s.source_files = "EXPLogger/*.{h,m,swift}"
like image 35
atereshkov Avatar answered Oct 14 '22 17:10

atereshkov