Azure Devops Pipelines - 具有多个配置文件的 Xcode 项目无法存档和签名 [英] Azure Devops Pipelines - Xcode project with multiple provisioning profiles fails archive and sign

查看:14
本文介绍了Azure Devops Pipelines - 具有多个配置文件的 Xcode 项目无法存档和签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 DevOps 的新手,所以如果我错过了一些基本的东西,请放轻松 :)

I'm new to DevOps so please go easy on me if I've missed something basic :)

我在 Azure Pipelines 中使用以下内容:带有 Xcode 构建代理的托管 MacOS(Xcode 版本 5.142.0)

I’m using the following in Azure Pipelines: Hosted MacOS with an Xcode Build Agent (Xcode Version 5.142.0)

我刚刚开始尝试为使用多个配置文件的基于 Xcode 的项目设置管道.在我的场景中,我的应用中有以下配置文件:

I've just started trying to set up a pipeline for an Xcode based project which uses multiple provisioning profiles. In my scenario I have profiles for the following in my app:

  • 意图
  • ItentsUI
  • 小工具
  • 应用

我已按照此处的说明设置证书和配置文件(尽管我的项目使用自动签名):https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/mobile/app-signing?view=vsts&tabs=apple-install-during-build

I've followed the instructions for setting up certs and provisioning profiles here (although my project uses automatic signing): https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/mobile/app-signing?view=vsts&tabs=apple-install-during-build

这些已正确安装到托管构建代理(没有错误),并且构建过程完美无缺,直到签名.

These are being installed correctly to a hosted build agent (no errors) and the build is proceeding perfectly until signing.

在签名期间,似乎没有任何目标可以找到他们的配置文件(在使用手动"和自动"分配时).

During signing it seems that the none of the targets can find their provisioning profiles (both when using 'manual' and 'automatic' assignment).

这是在日志中运行的内容:

Here's what is run in the logs:

[command]/usr/bin/xcodebuild -workspace/Users/vsts/agent/2.142.1/work/1/s/*MYAPP**.xcworkspace -scheme **MYAPP** archive -sdkiphoneos -configuration Release -archivePath/Users/vsts/agent/2.142.1/work/1/s/**MYAPP** CODE_SIGN_STYLE=Manual PROVISIONING_PROFILE= PROVISIONING_PROFILE_SPECIFIER= |/usr/local/bin/xcpretty --no-color

然后,当涉及到归档时,每个方案都会发生以下情况:

Then later when it comes to archiving the following occurs for each scheme:

错误:xxx Today Widget"需要具有推送通知和应用程序组功能的配置文件.为发布"选择配置文件在项目编辑器中构建配置.(在目标xxx Today Widget"中)

几个问题:

  1. 是否有任何人可以指点我的更新指南?这似乎是一个常见的用例,但我显然遗漏了一些东西.

  1. Is there an updated guide anyone can point me to? This seems like a common use case and I'm obviously missing something.

或者,在同一版本中归档和签署多个方案时,有没有办法强制将哪个配置文件用于哪个方案?

Alternatively is there a way to force which profile gets used for which scheme when archiving and signing multiple schemes in the same build?

自动签名是管道中的一个选项吗?

Is automatic signing an option in pipelines?

为了完整起见,我在这里看到了一个有点类似的问题:https://github.com/Microsoft/azure-pipelines-tasks/issues/964 但它已经关闭了两年多.

For completeness I've seen what looks like a somewhat similar issue here: https://github.com/Microsoft/azure-pipelines-tasks/issues/964 but it's been closed for more than two years.

推荐答案

经过仔细检查后发现我一直使用的开发证书是错误的(我的 Mac 上有一些).我把它换成了合适的版本,问题就消失了.

it turns out after closer inspection the development certificate I had been using was the wrong one (there were a few on my Mac). I swapped this for the appropriate version and the issues went away.

我现在可以成功构建、存档和签名.

I can now successfully build, archive and sign.

希望这对某人有所帮助.

Hopefully this helps someone.

安德鲁

这篇关于Azure Devops Pipelines - 具有多个配置文件的 Xcode 项目无法存档和签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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