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

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

问题描述

我是DevOps的新手,所以如果我错过了一些基本知识:)

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

我在Azure管道中使用以下内容:带有Xcode Build Agent(Xcode版本5.142.0)的托管MacOS

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
  • 小工具
  • 应用

我已按照此处(尽管我的项目使用自动签名)中的说明来设置证书和配置文件:

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 -sdk iphoneos -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:

error: "xxx Today Widget" requires a provisioning profile with the Push Notifications and App Groups features. Select a provisioning profile for the "Release" build configuration in the project editor. (in target '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.

希望这对某人有帮助.

安德鲁

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

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