error: Provisioning profile "Aaron_Dev_2" has platforms "watchOS and iOS", which does not match the current platform "macOS". and two more provisioning profile errors in xcode archive step in Azure pipeline for ionic cordova application.

My company has an Azure pipeline to build our ionc cordova application and produce an IPA file.

The Xcode archive step has suddenly started failing with the following errors.

/Users/runner/work/1/s/platforms/ios/xxxxx.xcodeproj: error: Provisioning profile "Aaron_Dev_2" has platforms "watchOS and iOS", which does not match the current platform "macOS". (in target 'xxxxx' from project 'xxxxx')

/Users/runner/work/1/s/platforms/ios/xxxxx.xcodeproj: error: Provisioning profile "Aaron_Dev_2" doesn't include the com.apple.security.get-task-allow entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target 'xxxxx' from project 'xxxxx')

/Users/runner/work/1/s/platforms/ios/xxxxx.xcodeproj: error: Provisioning profile "Aaron_Dev_2" doesn't include the currently selected device "Mac-1689862983816.local" (identifier 4203018E-580F-C1B5-9525-B745CECA79EB). (in target 'xxxxx' from project 'xxxxx')

The script being run is:

xcodebuild -workspace ./platforms/ios/xxxxx.xcworkspace -scheme xxxxx archive -archivePath $(Build.SourcesDirectory)/output/xxxxx.xcarchive

And is being run in Azure pipeline using a macOS pool.

I have seen a post with a similar error to my second error saying to change the signing from manual to automatic but I'm not sure how to do that. I have also checked the entitlements on the provisioning profile and it does include get-task-allow.

Nothing has changed with the profile since it started failing and the version of Xcode being used in the build is the same as when the pipeline was running successfully.

Any suggestions would be appreciated.

Thanks,

Aaron

Has anyone found a solution for this? we have a user who is also experiencing this same issue with xcode build.

error: Provisioning profile "Aaron_Dev_2" has platforms "watchOS and iOS", which does not match the current platform "macOS". and two more provisioning profile errors in xcode archive step in Azure pipeline for ionic cordova application.
 
 
Q