It seems like it would be simple and/or obvious how to configure your app to point to different environments (dev, QA, prod, etc.). But alas, it is neither simple nor obvious.
Here is some easy, practical wisdom that breaks down five different ways to configure different environments in an Xcode project. Spoiler: it finally lands on Script Phases. π€·π»ββοΈ
π How to configure Xcode projects for different environments
First of all, βοΈΒ do not use targets for environmental configuration purposes

Via iOS Dev Weekly.