I'm trying to build my iOS app from command line (macOS 12.0.1, XCode command line tools 184.108.40.206.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 **
-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.