There are no other way, I search a lot. In XCode 3 this is easy, but now..
In the screen above, I have the Build Configuration, so I can chose if I want:
This 2 kind of config, have their own config in "Build Settings" tabs (in targets config). To create I third one, the Distribution, reading here, it show this image in XCode 3
Where I can do the same in XCode 4????
edit->
Only create a new Schema didn't work, like this is a config in "Build Settings" tag of Targets. I can chose a config for "Debug" and "Release", but, and for I third one?
Have a look at the project settings. There is a +
button that you can use to add to configurations here.
You don't need it.
Make sure you check the following list before you Archive:
In Edit Scheme: Select Release as Build Configuration for Archive,
In Project Build Setting: Set Entitlements.plist and your Distribution code signing for Release scheme,
In Entitlements.plist: Set No to ‘can be debugged’.
Then archive and share with your ad-hoc provisioning or submit with distribution provisioning.
Hope this is a comprehensive checklist.
EDIT:
to duplicate an existing configuration:
I had a similar issue where I wanted some special behaviour for beta builds
These are the steps I took (mostly an expansion of the answer given by @ZhangChn)
- Duplicate the Release Configuration and rename it beta.
- Added a BETA pre-processor macro to the Beta Configuration under build settings.
- Make other changes to your build configuration here.
- Go into manage schemes and duplicate the main scheme for my project and rename it to Beta.
- Edit the new scheme and change the target build configuration to beta (or whatever you named your new build configuration.
- ...
- Profit!!!!
Or not, at any rate you should now be able to switch your desired setting simply by changing the scheme you're using instead of mucking about with settings every time.