Xcode 10归档失败-仅在命令行上(xcodebuild) [英] Xcode 10 archiving fails - only on command line (xcodebuild)

查看:276
本文介绍了Xcode 10归档失败-仅在命令行上(xcodebuild)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CI机器(Jenkins)上进行归档时遇到问题,当在SAME机器上使用Xcode UI手动运行过程时,一切正常.

I'm having issues with archiving on my CI machine (Jenkins), when running the process manually on the SAME machine but with the Xcode UI, everything works just fine.

我得到的错误是:

<unknown>:0: error: cannot have input files with file list

** ARCHIVE FAILED **


The following build commands failed:
    CompileSwift normal armv7
    CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
    CompileSwift normal arm64
(4 failures)

在失败时执行的原始命令非常长(68K +个字符),在这里,它从所有pods/app信息中删除:

The original command it's executing on failure is VERY long (68K+ characters), here it is stripped down from all pods/app info:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift @/var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/arguments-ece6e3.resp # -frontend -c -filelist /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/sources-e4a704 -supplementary-output-file-map /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/supplementaryOutputs-4e5601 -target arm64-apple-ios10.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk  -g -module-cache-path / ... /ModuleCache.noindex -swift-version 4 -O -D RELEASE -serialize-debugging-options ...  -module-name APPNAME -num-threads 8 -output-filelist /var/folders/cc/h3hp1kt14rv3j5t_lybwwgqh0000gp/T/outputs-3df91d

更多信息:

  1. 使用Cocoapods 1.5.3(还复制了最新的1.6.0_beta.1)
  2. 使用旧版构建系统"
  3. 我要存档的确切命令是: xcodebuild -scheme APPSCHEME -workspace APPNAME.xcworkspace -configuration Release clean build archive -derivedDataPath "../build" -archivePath "../build/APPNAME.xcarchive"
  1. Using Cocoapods 1.5.3 (also reproduces with latest 1.6.0_beta.1)
  2. Using the "Legacy Build System"
  3. the exact command I'm running to archive is: xcodebuild -scheme APPSCHEME -workspace APPNAME.xcworkspace -configuration Release clean build archive -derivedDataPath "../build" -archivePath "../build/APPNAME.xcarchive"

只是让事情变得更加有趣,当在本地计算机上运行archive命令时,我看不到任何故障...非常奇怪且不一致.

Just to make things even more interesting, when running the archive command on my local machine I see no failures... VERY strange and inconsistent.

任何帮助将不胜感激!

推荐答案

最终我弄清楚了,它看起来确实无关紧要,但这是唯一为我解决了所描述问题的东西.

Eventually I figured it out, it's something that looks really UNRELATED, and yet it was the only thing that fixed the described issue for me.

转到您的构建设置,然后删除在那里存在的所有递归搜索路径.而已. (任何以**结尾的搜索路径都是递归的.)

Go to your build settings and remove any recursive search paths you have there. That's it. (any search path that ends with ** is a recursive one).

祝你好运!

这篇关于Xcode 10归档失败-仅在命令行上(xcodebuild)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆