Build configurations and pre-release validation

Hi guys, wondering if you can help going a bit insane here
I’ve created a ā€˜Production’ configuration in Xcode, set my ā€˜Xcode archive’ step to use ā€˜$XCODE_CONFIGURATION’ in configuration name and set this variable to ā€˜Production’ in my release workflow. I’ve just downloaded the version that was submitted to testflight using this workflow, but it appears to have ignored this… so a couple of questions

  1. Is there a way to validate which configuration has been used in the logs? I can’t seem to find a reference to it being printed in the full logs for the build

  2. Is there a way I can validate that bitrise is building the correct configuration without actually submitting to the app store? I’m using an ā€˜app-store’ export option, so I don’t think I’m able to download the archived IPA, right?

The configuration you provided can be checked at the start of the Xcode steps (if you use our Xcode Archive or Xcode Test step):

+------------------------------------------------------------------------------+
| (7) xcode-archive                                                            |
+------------------------------------------------------------------------------+
| id: xcode-archive                                                            |
| version: 2.0.5                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-03-03T01:40:31-08:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[01:40:31]  * e[32;1m[OK]e[0m Step dependency (xcode) installed, available. 
e[34mINFOe[0m[01:40:31]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mipa export configs:e[0m
- ExportMethod: auto-detect
- UploadBitcode: yes
- CompileBitcode: yes
...
- CustomExportOptionsPlistContent:

e[34;1mxcodebuild configs:e[0m
- OutputTool: xcodebuild
- Workdir: /Users/vagrant/git
- ProjectPath: ./X/Y/Z.xcworkspace
- Scheme: X
- Configuration: 
- OutputDir: /Users/vagrant/deploy
- IsCleanBuild: no
- XcodebuildOptions: 
...

In the example above we did not force any configuration (- Configuration: ), which means that Xcode will select it based on the Scheme, just like when you click ā€œarchiveā€ in Xcode.app

After this, you can also see the xcodebuild command in the log which will be performed:

$ xcodebuild "-workspace" "./X/Y/Z.xcworkspace" "-scheme" "X" "archive" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__archive__565585348/X.xcarchive"

That’s exactly what will run. There’s nothing special here or bitrise specific, your inputs are transformed to xcodebuild parameters and then the xcodebuild ... command is executed, that’s all.

Xcode does print the configuration it will use in the log, you can see these lines:

=== BUILD TARGET Reachability OF PROJECT Pods WITH CONFIGURATION Release ===

which means that the Reachability project (pod) is built with the Release config.

If you use the xcpretty log formatter (default) these are tranformed into:

ā–ø Building ios-xcode-8.0/ios-xcode-8.0 [Release]

Which means the ios-xcode-8.0 project is building with the Release config.

Yes, from Xcode’s log - see above.

The export option does not affect the configuration, it only affects the code signing. If you set it to ā€œapp-storeā€ that means it will be code signed with your app store signing files, that does not force any configuration.
It’s the same in Xcode.app too, you can configure your project and have e.g. a Debug config build with App Store signing. Not usual, but Xcode won’t stop you :wink:

If you have any questions, just let us know!