ios – Self Hosted Agent on macOS not working with Azure Pipeline


This is a matter I have been going through for the previous week.

I’ve an M1 Mac Mini setup as a self-hosted agent to run iOS associated builds/archives by way of Azure Pipelines.

I will construct/archive regionally on the machine itself utilizing terminal. Cellular provisioning and code signing are setup and dealing nice.

Once I run the agent interactively utilizing, I’m able to run the pipeline efficiently. Once I strive operating the agent as a launchd service utilizing ./ set up -> ./ begin, it all the time fails with the identical error:


The next construct instructions failed:
    ValidateEmbeddedBinary /Customers/<consumer>/Library/Developer/Xcode/DerivedData/<challenge>/Construct/Intermediates.noindex/ArchiveIntermediates/<app-name>/BuildProductsPath/Debug-iphoneos/<app-name>.app (in goal '<app-name>' from challenge '<challenge>')
(1 failure)
##[error]Bash exited with code '65'.

The command I am utilizing to archive is

xcodebuild -workspace ~/repos/<challenge>/<challenge>.xcworkspace -scheme <app-name> -allowProvisioningUpdates clear archive -archivePath construct/<app-name> -destination generic/platform=iOS

Once more, this command works after I run it regionally and after I run the agent interactively.

I eliminated app/challenge names for privateness causes.

I’ve searched excessive and low as to why this error is happening and I’ve tried just about all solutions to repair it. For the lifetime of me I do not know why the command would work regionally and when the agent is run interactively, however doesn’t work when the agent is run as a launchd service.


Leave a Reply

Your email address will not be published. Required fields are marked *