user387184 user387184 - 1 year ago 157
iOS Question

understanding xCode schemes

From the docs it says about schemes:

"An Xcode scheme defines a collection of targets to build, a
configuration to use when building, and a collection of tests to

So I thought I create one debug scheme and one release scheme and set the build settings for Project and targets accordingly, ie using the distribution profiles for release scheme and the develop profile for debug.

But these settings DO NOT change when I select different schemes. In fact when I set the code signing to distribution it remains - switching to different schemes does not change anything.

Many thanks for clarifying!

Answer Source

You're confusing build configurations and schemes. Xcode projects have two build configurations: Debug and Release. In the build settings editor, you can give build settings different values for the Debug and Release build configurations. Click the disclosure triangle next to a build setting to show the values for the Debug and Release configurations. In your example you would find the Code Signing Identity build setting in the build settings editor. Set the value of the Code Signing Identity build setting to your develop profile for the Debug build configuration, and set it to the distribution profile for the Release build configuration.

After setting the build settings for the Debug and Release build configurations, use the scheme editor to choose the build configuration to use. The scheme editor has the following actions where you can choose the build configuration: Run, Test, Profile, Analyze, and Archive. Xcode initially uses the Debug configuration for running, testing, and analyzing and uses the Release configuration for profiling and archiving. The Run action is the one you're most likely to change over the course of developing your app.

In most cases you can get away with one scheme. You don't normally need one Debug scheme and one Release scheme. The main reason you would need one Debug and one Release scheme is if you needed to run, test, profile, and analyze your app for both the Debug and Release build configurations.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download