title: Azure Devops Pipelines - Xcode project with multiple provisioning profiles fails archive and sign
body: <p>I'm new to DevOps so please go easy on me if I've missed something basic :)</p>
  <p>I’m using the following in Azure Pipelines: Hosted MacOS with an Xcode Build Agent (Xcode Version 5.142.0)</p>
  <p>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:</p>
  <ul>
  <li>Intents</li>
  <li>ItentsUI</li>
  <li>Widget</li>
  <li>App</li>
  </ul>
  <p>I've followed the instructions for setting up certs and provisioning profiles here <strong>(although my project uses automatic signing)</strong>:
  <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/mobile/app-signing?view=vsts&amp;tabs=apple-install-during-build" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/mobile/app-signing?view=vsts&amp;tabs=apple-install-during-build</a></p>
  <p>These are being installed correctly to a hosted build agent (no errors) and the build is proceeding perfectly until signing.</p>
  <p>During signing it seems that the none of the targets can find their provisioning profiles (both when using 'manual' and 'automatic' assignment).</p>
  <p>Here's what is run in the logs:</p>
  <p><code>[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</code></p>
  <p>Then later when it comes to archiving the following occurs for each scheme:</p>
  <p><code>error: &quot;xxx Today Widget&quot; requires a provisioning profile with the Push Notifications and App Groups features. Select a provisioning profile for the &quot;Release&quot; build configuration in the project editor. (in target 'xxx Today Widget')</code></p>
  <p>A few questions:</p>
  <ol>
  <li><p>Is there an updated guide anyone can point me to? This seems like a common use case and I'm obviously missing something.</p>
  </li>
  <li><p>Alternatively is there a way to force which profile gets used for which scheme when archiving and signing multiple schemes in the same build?</p>
  </li>
  <li><p>Is automatic signing an option in pipelines?</p>
  </li>
  </ol>
  <p>For completeness I've seen what looks like a somewhat similar issue here: <a href="https://github.com/Microsoft/azure-pipelines-tasks/issues/964" rel="nofollow noreferrer">https://github.com/Microsoft/azure-pipelines-tasks/issues/964</a> but it's been closed for more than two years.</p>