Better Programming

Advice for programmers.

Follow publication

Member-only story

PIECES OF A SCALABLE IOS APP ARCHITECTURE

Dev/Staging/Prod Configs in Xcode

Using .xcconfig and config.plist files for different environments

Sven Korset
Better Programming
Published in
8 min readFeb 7, 2020
Photo by Hanson Lu on Unsplash

In a project, one often develops in different environments. For example, all server requests are to go against the Dev server during development, later for testing against the Staging server and at the end against the Prod server.

Or different test scenarios can be used — e.g., only mocked requests during development and the database should be filled on each app start with prepared test data. For that, you don’t want to change the code all the time. 😫

Use configuration files to easily exchange environment-dependent data.

This can be done in different ways.

By the way, thank you Quentin Fasquel for pushing me to a better solution with your reply! 😊👍

Incidentally, this is an article from the “Pieces of a scalable iOS app architecture” series.

The Old, Deprecated Way

This approach uses different project targets to copy the appropriate config file to the bundle. It works, but there are some drawbacks, which will be covered later on. So, if you’re…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Sven Korset
Sven Korset

Written by Sven Korset

Just a guy with some thoughts 😊

Responses (5)

Write a response