Daily iOS
Build and distribution

Separating build environments

You want to build against development, staging, and production servers from one project. How would you set up the schemes, build configurations, and xcconfig files?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Define API_BASE_URL, the bundle ID suffix, and the app name per environment in xcconfig files, create configurations for Debug and Release crossed with each environment and attach an xcconfig to each, and let the scheme pick the configuration. Secrets don't go in xcconfig.

Share a question