iOS: Best Way to Handle Separate Staging & Productions Apps on Testflight?

What is the ideal way to handle a single Ionic iOS App that can be used for a staging a production app in Testflight?

Personally I use two separate configurations (LIVE/BETA) coded in the app and provide a way in the UI for the user to dynamically switch between the two environments, default being the LIVE configuration.
There are other ways to approach this is well, you can use a app configuration api call that configures the environment the app should use and dynamically change for each user.

API’s are auto generated which includes the base url. This cannot be updated during runtime. It makes more sense to have a staging/production App since we have 2 separate Clusters for these environments.