29

I am trying to use xcodebuild -allowProvisioningUpdates on a machine that I only have access via the command line (Azure Devops macOS Hosted Machine).

Unfortunately, according to man xcodebuild in order to use -allowProvisioningUpdates it seems that "Requires a developer account to have been added in Xcode's Accounts preference pane."

Giving this, is there a way do add the account via the command line?

Thank you, Cosmin

Cosmin
  • 2,840
  • 5
  • 32
  • 50
  • 1
    Why don't you use manual signing instead? Seems like you are setting up CI so manual signing could work for you. – manishg May 03 '19 at 03:16
  • 2
    I don't want to manually maintain the provisioning profile on the build machine. This is especially painful with Ad Hoc provisioning profiles, which are updated every time you add a new device. Using -allowProvisioningUpdates means that xcodebuild automatically updates / downloads the provisioning profile as needed. – Cosmin May 03 '19 at 06:25
  • 3
    Hey, have you tried having a look at this? https://stackoverflow.com/questions/46295291/allowprovisioningupdates-doesnt-work/47076629#47076629 – Lucat May 03 '19 at 11:54
  • 2
    Indeed there are some entries in the Keychain that are associated with Xcode's Accounts preference pane, such as com.apple.gs.xcode.auth.com.apple.account.AppleIDAuthentication.token, Xcode-AlternateDSID, Xcode-Token. Worst case I could try exporting these and using them on the agent, but it feels quite fragile (and possibly incomplete as Xcode might store additional account information in other places as well). I was hoping to a more "Public API" type of interaction. – Cosmin May 06 '19 at 07:23
  • I opened a rdar back in 2018 asking for a public API for this but have not heard back from Apple :( We are still manually signing our applications in our CI (Travis). Feel free to dupe it: FB5718979 – Xavier Jurado Apr 03 '20 at 09:05
  • I've also opened a ticket (FB7651409) and linked this Stack Overflow question. Silly me didn't think of opening a ticket way earlier - I guess I'm not that used of suggesting features to Apple (I do it for most of the other development tools I use ...). – Cosmin Apr 04 '20 at 10:37
  • Hi, I wonder if you manage to overcome this issue. I'm also looking for a way to install development account from command line because I don't have access to the machine's UI. – Zohar81 Nov 28 '21 at 12:31
  • I didn't receive an answer on my feedback ticket. Right now we're using Azure DevOps and we're manually uploading the cert and the provisioning profile in the Secure Files section. – Cosmin Dec 02 '21 at 06:58

0 Answers0