I am having an issue with an Azure DevOPS pipeline for an Xcode iOS app. I have created the pipeline from scratch and it uses a yaml file where I define the build as well as the signing and provisioning based on Microsoft's official documentation. The build uses XcodeVersion=10 with CocoaPods and implements signing and provisioning. I have no problem with the pre-installation of the P12 cert, the build pulls it the from the Secure Files library and installs it successfully.
What's giving me an issue is the provisioning profile. I must be doing something wrong on the InstallAppleProvisioningProfile@1 task or in the configuration of the ProvisioningProfileUuid in the Xcode task because the build throws the following error on the Xcode task:
❌ error: "Register" requires a provisioning profile with the Wireless Accessory Configuration feature. Select a provisioning profile for the "Release" build configuration in the project editor. (in target 'Register')
I have tried setting the provProfileSecureFile setting of the InstallAppleProvisioningProfile@1 task to point to both a '.provisionprofile' and a '.mobileprovision' file but I still see no command being executed in the logs. The app can be built, signed and provisioned based on the 'MyProvisioning_Profile.mobileprovision' locally without a problem.
pool:
vmImage: 'macOS-10.13'
variables:
scheme: ''
sdk: 'iphoneos'
configuration: 'Release'
steps:
# Install an Apple certificate required to build on a macOS agent
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'MyProductionCert.p12'
certPwd: $(P12password)
# Install an Apple provisioning profile required to build on a macOS agent
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'Secure Files'
provProfileSecureFile: 'MyProvisioning_Profile.provisionprofile'
removeProfile: false
- task: Xcode@5
inputs:
sdk: '$(sdk)'
configuration: '$(configuration)'
xcodeVersion: '10'
exportPath: '$(agent.buildDirectory)/output/$(sdk)/$(configuration)'
packageApp: false
xcWorkspacePath: 'Register.xcworkspace'
scheme: 'Register'
signingOption: 'manual'
signingIdentity: $(APPLE_CERTIFICATE_SIGNING_IDENTITY)
provisioningProfileUuid: $(APPLE_PROV_PROFILE_UUID)
I would expect to see at least a command being executed from the InstallAppleProvisioningProfile@1 task but what I see are 2 successful, but empty tasks in the logs: 1. Pre-job: InstallAppleProvisioningProfile 2. InstallAppleProvisioningProfile
The Azure DevOPS Xcode task then fails with this error:
2019-02-08T01:35:05.1819530Z [command]/usr/bin/xcodebuild -sdk iphoneos -configuration Release -workspace /Users/vsts/agent/2.146.0/work/1/s/Register.xcworkspace -scheme Register build CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=iPhone Distribution: [MyCompany LLC] ([MyTeamID]) PROVISIONING_PROFILE= PROVISIONING_PROFILE_SPECIFIER= | /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty -r junit --no-color
2019-02-08T01:35:10.6519500Z ❌ error: "Register" requires a provisioning profile with the Wireless Accessory Configuration feature. Select a provisioning profile for the "Release" build configuration in the project editor. (in target 'Register')
2019-02-08T01:35:10.6560090Z ** BUILD FAILED **
Has anybody using Azure pipelines has seen this issue before? How can I fix it?