I'm using xcodebuild
utility shipped with Xcode 3 to automate my builds under Hudson. The command looks like it follows:
xcodebuild -project Project.xcodeproj -target Target -configuration Release -sdk iphoneos CODE_SIGN_IDENTITY[sdk=iphoneos*]="iPhone Distribution:XXXXXX"
I'm trying to use the same command for Xcode 4 but it seems that xcodebuild
just ignores CODE_SIGN_IDENTITY
parameter and signs with the provisioning profile which is selected for the target in Xcode.
It's a quite crucial for me since I have to sign build with 3-4 different profiles. It works OK with Xcode 3 but doesn't work with Xcode 4.
Any idea how to solve this problem?
A newer xcodebuild now allows settings to be specified. Taken from developer.apple.com:
xcodebuild [-project projectname] [-target targetname ...]
[-configuration configurationname] [-sdk [sdkfullpath | sdkname]]
[buildaction ...] [setting=value ...] [-userdefault=value ...]
I also found this resource for explaining the available settings
CODE_SIGN_IDENTITY (Code Signing Identity)
Description: Identifier. Specifies the name of a code signing identity.
Example value: iPhone Developer
However, PROVISIONING_PROFILE is missing from the index of available commands.
The command I finally used specified "CODE_SIGN_IDENTITY" & "PROVISIONING_PROFILE" settings.
xcodebuild -sdk <iphoneos> -target <target_name> -configuration <Debug> CODE_SIGN_IDENTITY="iPhone Developer: Mister Smith" PROVISIONING_PROFILE="XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With