iOS存档失败:命令/ usr / bin / ditto失败,退出代码为1

时间:2016-03-04 03:40:12

标签: ios swift compilation

我正在尝试归档我的iOS项目,并且在编译完每个文件之后它在ditto命令上失败了。

整个日志文件大约200MB,包含敏感信息,所以我不会发布它。 这是失败的输出线。

Ditto /Users/iosjenkins/Library/Developer/Xcode/DerivedData/MyApp-dikjbbwmnvizjmdpbkrxixczfmqo/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Development-iphoneos/MyApp.build/DerivedSources/MyApp-Swift.h /Users/iosjenkins/Library/Developer/Xcode/DerivedData/MyApp-dikjbbwmnvizjmdpbkrxixczfmqo/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Development-iphoneos/MyApp.build/Objects-normal/armv7/MyApp-Swift.h
cd /Users/iosjenkins/.jenkins/jobs/MyAppDevelopmentNightly/workspace/MyApp
export PATH="/Applications/Xcode7.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode7.2.1.app/Contents/Developer/usr/bin:/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/ditto -rsrc /Users/iosjenkins/Library/Developer/Xcode/DerivedData/MyApp-dikjbbwmnvizjmdpbkrxixczfmqo/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Development-iphoneos/MyApp.build/Objects-normal/armv7/MyApp-Swift.h /Users/iosjenkins/Library/Developer/Xcode/DerivedData/MyApp-dikjbbwmnvizjmdpbkrxixczfmqo/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Development-iphoneos/MyApp.build/DerivedSources/MyApp-Swift.h
ditto: can't get real path for source '/Users/iosjenkins/Library/Developer/Xcode/DerivedData/MyApp-dikjbbwmnvizjmdpbkrxixczfmqo/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Development-iphoneos/MyApp.build/Objects-normal/armv7/MyApp-Swift.h'
Command /usr/bin/ditto failed with exit code 1

我的项目非常大~1000个swift文件。 xcodebuild编译的每行输出都是110k字符的文本。

5 个答案:

答案 0 :(得分:3)

如果其他人仍然遇到此问题,我在一段时间没有重新访问项目后出现此错误。清洁后它消失了:

Command-Shift K

产品>清洁

答案 1 :(得分:1)

答案 2 :(得分:1)

这对我有用:

  1. 清洁
  2. 退出Xcode
  3. 打开Finder,然后转到〜/ Library / Developer / Xcode / DerivedData 删除此文件夹中的所有内容
  4. 打开Xcode
  5. 构建
  6. 顺便说一句,在我运行'CleanMyMac'之后,这个问题发生在我身上,它似乎删除了DerivedData的一部分。

答案 3 :(得分:0)

对我来说, 更改派生数据的路径 有所帮助。

在此之前,我尝试清理(cmd + shift + k),删除派生数据,尝试pod更新,重新启动xcode等,但似乎没有任何工作。

答案 4 :(得分:0)

这是一个已经使用最新版本的Xcode从版本8修复的错误。