0

I'm trying to build my iOS app from command line (macOS 12.0.1, XCode command line tools 13.4.0.0.1.1651278267).

To do this, I run following command:

xcodebuild -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone -configuration Release -allowProvisioningUpdates -destination "platform=iOS,name=myiPhone" DEVELOPMENT_TEAM=myTeamId CODESIGN_IDENTITY=my-codesign-identity

However, I get the following output:

error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target 'Unity-iPhone' from project 'Unity-iPhone')

error: No profiles for 'com.myCompany.myApp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.myCompany.myApp'. (in target 'Unity-iPhone' from project 'Unity-iPhone') ** BUILD FAILED **

I thought -allowProvisioningUpdates is supposed to handle the provisioning profiles for me?

Am I doing something wrong? How do I get this to work?

I am hoping for a solution that I can run from the command line, since I am trying to build an automated pipeline.

0

1 Answer 1

0

Well, I can't guarantee that I didn't do any intermediate steps, but incase other people find this, what ended up working for me was to:

  • make sure I unlocked the keychain right before the build command

    security -v unlock-keychain login.keychain

  • add my DEVELOPMENT_TEAM to the command

    xcodebuild -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone -configuration Debug -derivedDataPath ../iosBinary -allowProvisioningUpdates DEVELOPMENT_TEAM=XXXXXXXXX

Replace XXXXXXXXX with your actual development team ID.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .