When using Xcode to build and run your app, a collection of build settings referred to as build configuration is used to package the Application bundle.

To see what build configuration Xcode uses, open the Scheme editor. In Xcode choose Product > Scheme > Edit Scheme…, then select the Run action for the app.

“A build configuration specifies a set of build settings used to build a target’s product in a particular way. For example, it is common to have separate build configurations for debug and release builds of a product.” - Apple, 2011-05-09: XcodeConcepts, Build Settings

By default, Xcode uses the “Debug” build configuration, also used by Windmill, to build and test your app. To see what build configuration Windmill uses, open the Side panel. In Windmill choose View > Side Panel > Show Side Panel.

Equally like Xcode, Windmill uses the “Release” build configuration to produce the Archive bundle. The build configuration used by Windmill for the archive is also visible in the Side Panel.

How does that help?

There are at least two ways to take advantage of using a “Debug” and a “Release” build configuration for the development and release of your app respectively.

1. Conditional compilation

You can use a build setting, one for a Swift codebase and one for Objective-C, that allows you to conditionally compile a block of code.

In Swift that is the “SWIFT_ACTIVE_COMPILATION_CONDITIONS” or “OTHER_SWIFT_FLAGS” setting.

In Objective-C that is the “GCC_PREPROCESSOR_DEFINITIONS” setting.

By default, Xcode sets the value to “DEBUG” for both Swift and Objective-C under your Application target.

You can use this value as an identifier in your code to conditionally compile a code path. As an example, this can be helpful if you want to use a different endpoint during development than the release.

2. File management

Some build settings specify a file to be used. A common one is the “INFOPLIST_FILE” setting which specifies which property list file to use when packaging a bundle.

As an example, for NSAppTransportSecurity you want to make sure that any exception rules you have for development don’t leak into your release build. This is the case if your development build uses different endpoints to your release one.

In closing

Windmill’s integration with Xcode’s build configurations gives you the ability to manage the development of your app towards a release in a streamlined way.

Regardless of how much you have a need for the “Debug” and the “Release” build configurations, Windmill uses them to build your app accordingly.