12

I want to use

xcodebuild […] -allowProvisioningUpdates

To build my iOS app and have a provisioning profile automatically generated.

man xcodebuild says:

Requires a developer account to have been added in Xcode's Accounts preference pane.

This works fine locally. When I run this in my CI server, I see

Code Signing Error: There are no accounts registered with Xcode. Add your developer account to Xcode

Because, of course, I'm not logged in there.


How can I add my developer account to Xcode from a script?

For reference, I'm using CircleCI and fastlane, but would accept any answer that uses only command-line tools.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287

1 Answers1

0

My solution was to copy the .provisionprofile files to the build server, and copy to them to the right directory during the build process. You still need to log into Apple Developer - I use -authenticationKeyID and -authenticationKeyIssuerID - but no other changes are needed. The project still uses automatic signing.

It's not ideal, because the build starts to fail when the profiles expire, but its' better than using manual signing.

alekop
  • 2,838
  • 2
  • 29
  • 47