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

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…