ios - Jenkins 不支持构建操作 'archive'

标签 ios xcode jenkins ipa

我正在使用 Jenkins 构建 .ipa 但是代码签名时出现错误。 为什么不支持归档命令?

我得到的错误是:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/Shared/Jenkins/Home/workspace/ginav-mobile/build/Distribution-iphoneos/ginav-mobile.app

** BUILD SUCCEEDED **

=== BUILD TARGET ginav-mobile OF PROJECT ginav-mobile WITH CONFIGURATION Distribution ===

Check dependencies
unsupported build action 'archive'
Code sign error: No command to generate product wrapper at '/Users/Shared/Jenkins/Home/workspace/ginav-mobile/build/Distribution-iphoneos/ginav-mobile.app'.

** ARCHIVE FAILED **

最佳答案

我遇到了同样的错误。看完这篇我设法解决了thread .
Xcode 插件似乎在存档命令上使用了“-target”,不确定为什么不起作用(不再?)

对我有用的是:我没有让插件执行存档,而是使用以下命令添加了一个额外的构建步骤“Execute shell”:

 "xcodebuild -project "TestApp.xcodeproj" -scheme "TestApp" -configuration Debug archive"

更深入

在 Jenkins 中:

在“General build settings”下的“Xcode”步骤的“Build”下的项目配置中,取消选中“Generate Archive?”

uncheck-generate-archive


在“添加构建步骤”下拉菜单中选择“执行 Shell”
使用您各自的应用程序名称和所需的配置(调试)编写此命令。

xcodebuild -project "TestApp.xcodeproj" -scheme "TestApp" -configuration Debug archive


archive-command



现在在 Xcode 中,确保您的 Scheme 设置为 Shared 并且 Scheme Data 也已提交和推送。 在“管理方案”中完成

enter image description here


否则 Jenkins 将找不到您的 Scheme 并将显示类似于以下的错误:

The project 'TestApp' does not contain a scheme named 'TestApp2'

这应该可以使您的应用存档,希望对您有所帮助! 这应该会创建您的存档。

PS:为了使用 Xcode 设置制作 Jenkins,我使用了这个不错的 guide

关于ios - Jenkins 不支持构建操作 'archive',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23650206/

相关文章:

ios - 链接器命令失败(Apple Mach-O)

ios - viewWithTag 在 cellForRowAtIndexPath 方法中返回 nil

java - Jenkins WAR 文件未在 Tomcat 上部署 - 缺少主目录?

ios - 在OpenGL场景背景中绘制纹理四边形

ios - 使用 AFNetworking 显示下载图像的进度

ios - 类型 'Reactive<UITextField>' 的值没有成员 'text'

Jenkins 工作生成器 : How to correctly include job-templates from external file?

objective-c - IB 的 GestureRecognizers 在模拟内存警告时导致应用程序崩溃

ios - SKLabelNode 倒置可能吗?

jenkins 多分支管道禁用自动节点结帐