I have a task in Azure DevOps CI pipeline:

- task: Xcode@5
  displayName: 'Xcode build-for-testing'
  inputs:
    actions: 'clean build-for-testing'
    configuration: Test
    sdk: iphoneos
    xcWorkspacePath: '${{ parameters.xcWorkspacePath }}'
    scheme: $(testName)
    xcodeVersion: '${{ parameters.xcodeVersion }}'
    signingOption: auto
    args: '-derivedDataPath $(Agent.BuildDirectory)/$(testName)'
    xcodeDeveloperDir: '${{ parameters.xcodeDeveloperDir }}'
    publishJUnitResults: false
    useXcpretty: false
    provisioningProfileUuid: 'UID#'
  condition: succeededOrFailed()

The pipeline used to use just the wildcard provisioning profile for everything.

I had to add additional entitlements to one of the targets, which required to create a specific profile with entitlements for that target's bundle id. I install both profiles using two - task: InstallAppleProvisioningProfile@1 tasks - one for the specific profile for 1 bundle id, and one for the wildcard profile for all other targets/bundle ids.

The issue now is that I can't seem to be able to apply specific profile just to 1 target, and the wildcard profile to the rest, and my pipeline builds keep failing due to provisioning profile errors.

Combinations that I tried:


COMBO 1

PIPELINE: task: Xcode@5 - signingOption: auto

PROJECT SETTINGS: manual signing for AARRsTestHostNoA55NN target with bundleID-specific profile AARRsTestHostNoA55NN_PROFILE

ERROR:

/Users/runner/work/1/s/AARRsiOS/AARRsLib/AARRs.xcodeproj: error: AARRsTestHostNoA55NN has conflicting provisioning settings. AARRsTestHostNoA55NN is automatically signed, but provisioning profile AARRsTestHostNoA55NN_PROFILE has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor. (in target 'AARRsTestHostNoA55NN' from project 'AARRs')


COMBO 2

PIPELINE: task: Xcode@5 - signingOption: manual

PROJECT SETTINGS: manual signing for AARRsTestHostNoA55NN target with bundleID-specific profile

Throws a bunch of errors - for some targets it complains that they don't support profiles at all, but one was forced on them, and for other targets it complains about bundle id not matching. Obviously, the specific profile is supplanting the wildcard one for other targets.

ERROR:

(target name) does not support provisioning profiles, but provisioning profile AARRsTestHostNoA55NN_PROFILE has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor.

Provisioning profile "AARRsTestHostNoA55NN_PROFILE" has app ID "com.company.AARRsTestHostNoA55NN", which does not match the bundle ID "(another target's bundle id)". (in target '(another target's name' from project 'AARRs')


COMBO 3

Using signingOption: default for the task: Xcode@5 should make the Xcode@5 task respect the Project defaults per Microsoft's doc:

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/xcode-v5?view=azure-pipelines

In the project settings I have manual signing for AARRsTestHostNoA55NN target with bundleID-specific profile and automatic signing with wildcard profile for all other targets. Despite that it still behaves as if I enabled automatic signing for AARRsTestHostNoA55NN with the wildcard profile:

ERROR:

/Users/runner/work/1/s/AARRsiOS/AARRsLib/AARRs.xcodeproj: error: Provisioning profile "iOS Team Provisioning Profile: *" doesn't support the iCloud capability. (in target 'AARRsTestHost' from project 'AARRs')

/Users/runner/work/1/s/AARRsiOS/AARRsLib/AARRs.xcodeproj: error: Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the com.apple.developer.icloud-container-identifiers, com.apple.developer.icloud-services, and com.apple.developer.ubiquity-container-identifiers entitlements. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target 'AARRsTestHost' from project 'AARRs')


I may have tried other combos.


So, the issue is that I cannot seem to be able to use a specific profile for 1 target without forcing it onto other targets.

I would appreciate any help because I am losing my mind at this point.

0

There are 0 best solutions below