ios xcode 构建失败,错误代码 65,没有指示性消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28794243/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 05:03:46  来源:igfitidea点击:

xcode build fails with error code 65 without indicative message

iosobjective-ciphonexcodexcodebuild

提问by Nimrod Gutman

I'm experiencing weird behaviour with my iPhone CI job (running in TeamCity). Every once in a while our build fails without any indicative error in the build log. The build reaches the last stage of codesign validation and I get ** BUILD FAILED **message immediately after.

我的 iPhone CI 工作(在 TeamCity 中运行)遇到了奇怪的行为。每隔一段时间,我们的构建就会失败,构建日志中没有任何指示性错误。构建到达协同设计验证的最后阶段,** BUILD FAILED **之后我立即收到消息。

These are the last lines of the log of a good and bad builds -

这些是好的和坏的构建日志的最后几行 -

Bad Build
[15:00:56] :             [CodeSign]     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[15:00:58]W:     [Step 3/6] ** BUILD FAILED **

Good Build
[14:09:13] :             [CodeSign]     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[14:09:13] :     [Step 3/6] ** BUILD SUCCEEDED **

Because it's running in a CI I looked for user interaction problems (opening the keychain...etc') but usually xcodebuild spews the relevant errors.

因为它在 CI 中运行,所以我查找了用户交互问题(打开钥匙串...等),但通常 xcodebuild 会出现相关错误。

Is there any other log I can dig into to find the cause of the build failures?

是否有任何其他日志可以挖掘以找到构建失败的原因?

EDIT: Seems I had the same problem like build failed jenkins iOS no error.

编辑:似乎我有同样的问题,比如build failed jenkins iOS no error

回答by Mr. Morris

I also had a similar problem, in my case it was caused by the fact I'm using both Xcode 7.2 and Xcode 6.4 side by side. When the simulator of Xcode 6.4 is open (iOS Simulator 8.4) and I try to start a test from the commandline using Xcode 7.2 I get this 65 error.

我也遇到了类似的问题,就我而言,这是由于我同时使用 Xcode 7.2 和 Xcode 6.4 造成的。当 Xcode 6.4 的模拟器打开(iOS Simulator 8.4)并且我尝试使用 Xcode 7.2 从命令行开始测试时,我收到此 65 错误。

Eg. when iOS Simulator 8.4 is open:

例如。当 iOS Simulator 8.4 打开时:

# sudo xcode-select -s "/Applications/Xcode 7.2.app/Contents/Developer"
# xcodebuild test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -workspace "/path/to/MyWorkspace.xcworkspace" -scheme "MyProject" -destination "platform=iOS Simulator,name=iPhone 6,OS=9.2"
(cut)
** TEST FAILED **
# echo $?
65

Solution is to kill the simulator before starting the test:

解决方法是在开始测试之前杀死模拟器:

# killall "iOS Simulator"
# killall "Simulator"

The process is called "iOS Simulator" for XCode 6.4 and earlier and called "Simulator" for later XCode versions.

该过程在 XCode 6.4 及更早版本中称为“iOS 模拟器”,在更高版本的 XCode 中称为“模拟器”。

回答by Nimrod Gutman

Had the same problem as build failed jenkins iOS no error

有与构建失败相同的问题jenkins iOS 没有错误

tl;dr - CopyPNG failed because of two images with the same name.

tl;dr - CopyPNG 因两个同名图像而失败。

回答by Mahesh Narwade

You need to remove platform ios - $cordova platform rm ios, and then add platform - $cordova platform add ios. now build ios - $cordova build ios

需要删除platform ios - $cordova platform rm ios,然后添加platform - $cordova platform add ios。现在构建 ios - $cordova 构建 ios

回答by Rajusa

I hit this when updating to Xcode 8, in my case it was because I had set the PROVISIONING_PROFILE_SPECIFIER setting incorrectly

我在更新到 Xcode 8 时遇到了这个问题,就我而言,这是因为我错误地设置了 PROVISIONING_PROFILE_SPECIFIER 设置