I\'m trying to build my app with xcodebuild:
xcodebuild -workspace \"RG.xcworkspace\" -scheme \"Production\" -configuration \"Release\" build CONFIGURATION_B
There is an option, -exportSigningIdentity which can help you, because provisioning profiles of Application & Extension/Widget may be different, but signing identities of app & extension are supposed to be same.
For example, you will see that,
are essentially same string, lets say this identity is "Code Signing Identity (id)". So to build & export archive, what you can run, are simply,
xcodebuild clean -workspace HelloWorld.xcworkspace -scheme HelloWorld
xcodebuild -workspace HelloWorld.xcworkspace -scheme HelloWorld archive -archivePath ~/output/HelloWorld.xcarchive
xcodebuild -exportArchive -exportFormat ipa -archivePath ~/output/HelloWorld.xcarchive -exportPath "HelloWorld.ipa" -exportSigningIdentity "Code Signing Identity (id)"
Reference: xcodebuild documentation