简体   繁体   English

尝试发布Pod后,错误'xcodebuild:返回失败的退出代码'

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

Command 'pod trunk push --verbose' outputs the following: 命令'pod trunk push --verbose'输出以下内容:

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. 我有Xcode 8.1,Cocoapods v 1.2.0。 Pod's repository is here . Pod的存储库就在这里

Could anybody tell me reason of that problem and how It may be fixed? 有谁能告诉我这个问题的原因以及如何修复它?

The problem comes down to this line in your podspec: 问题归结为podspec中的这一行:

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

The :tag is the problem. :tag是问题所在。 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. 您当前的pod验证不知道哪个提交代表您要发布的最终结果,这将是您的“ 0.1.0 ”版本。 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 ). 这就是为什么验证步骤是指您的repo的旧版本(在删除它之前您确实存在FrameworkStoryboard.storyboard )。

In other words, you need to tag your Pod with a tag that corresponds to your version number . 换句话说, 您需要使用与您的版本号对应的标记标记您的Pod

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 . 如果它通过,那么你应该做你的pod trunk push --verbose

StoryBoard cant be a source file in Cocoapods. StoryBoard不能成为Cocoapods的源文件。 If you want to add it to Cocoapods please add it to a resources filepattern 如果要将其添加到Cocoapods,请将其添加到资源文件模式

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}"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 发布pod repo遇到“ xcodebuild:返回失败的退出代码” - publish pod repo encounter “xcodebuild: Returned an unsuccessful exit code” 创建自己的 Pod 库 Swift 并得到 ERROR | [iOS] xcodebuild:返回不成功的退出代码 - Create Own Pod Library Swift and get ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code 使用Pod安装后出现Swift错误(铛:错误:链接器命令失败,退出代码为1) - Swift error after using pod install (clang: error: linker command failed with exit code 1 ) Xcode:安装 pod 后构建失败(错误:链接器命令失败,退出代码 1) - Xcode: Build fails after pod installation (error: Linker command failed with exit Code 1) Pod init 错误工具“xcodebuild”需要 Xcode - Pod init error tool 'xcodebuild' requires Xcode 创建 pod 并发布后,pod install 未安装它 - After creating a pod and Publishing it not installed by pod install 命令xcodebuild失败,退出代码为65-NativeScript - Command xcodebuild failed with exit code 65 - NativeScript 命令 xcodebuild 失败,退出代码为 70 - Nativescript - Command xcodebuild failed with exit code 70 - Nativescript Xcodebuild 失败退出代码 65 - ios - Xcodebuild failed exit code 65 - ios 错误:pod:使用Cordova的命令失败,退出代码为1 - Error: pod: Command failed with exit code 1 using Cordova
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM