Hosted CI Blog

Hosted Continuous Integration for iOS and Mac

Configure Code-Signing for CI Build

This post duplicates our knowledge base entry here.

Code-signing of iOS apps is often quite tricky and so questions on it arise.

It is common to have situations where build on different machines needs different code-signing settings Developer may use his own iPhone Developer identity to test app on his device, however appropriate iPhone Distribution identity has to be used for “Ad-Hoc” builds sent to testers.

When using continuous integration builds it may rise the problem: if identity set in Xcode project is iPhone Developer and it is committed into source code repository – it cannot be used by build server as is.

The solution is simple. Xcode has concept of build configurations and by default two of them are available: Debug and Release.

So there are two ways to solve the problem:

  1. Configure iPhone Developer for Debug builds and iPhone Distribution for Release builds. Then use Release configuration in CI builds.

  2. Add configuration specific to CI build and make it use appropriate iPhone Distribution identity. Then use it in CI builds.

In both cases you’ll be able to commit Xcode project into repository and then not have to override identity for each specific build. However in first case developer still occasionally may need to alter code signing identity to debug Release builds.