Best Practice to Set up ios Environments: Develop, Staging, and ProductionJuly 19, 2021 Publish By : EXPERT APP DEVS 1 min read Viewed By : 534
Development (Internal testing ):-
- Development distribution outside the iOS App Store
- Used for development and internal testing
- Change api server url to development server
- Staging distribution outside the iOS App Store
- Used for Staging and Client testing
- Change api server url to Staging server
- Distribution in the iOS App Store
- Used for AppStore user
- Change api server url to Production server
How to add Setup environment to our project :-
- Create project
- Adding Configurations
- Every project created with two default configurations 1. Debug 2. Release
- Now our project needs to create with three configuration development , staging and production.
- To add new configuration click on + button below configuration list.
- Storing the configuration in info.plist
- To access the configuration at runtime, we need to store it in the target's Info.plist.
- In info.plist Add new Row to create a new key-value pair. Set the key as Configuration and the value$(CONFIGURATION).
- configuration stored in the target's Info.plist, Now it is time to add the ability to easily switch environments. We do this by adding a scheme for every configuration.
- Set configuration to scheme
Select server type when creating Archive.
- Select server type when creating Archive.
Need a consultation?
Drop us a line! We are here to answer your questions 24/7.