Last active
January 17, 2018 16:27
-
-
Save nrlnishan/ca4f6a70d4a0d786f6fe912dff064abd to your computer and use it in GitHub Desktop.
Managing multiple environments in Xcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Duplicate Build Configurations from Project Settings | |
- Example: Duplicate debug & name it as debugDev. Duplicate release & name it as releaseDev. | |
2. Change Project's bundle identifier from Target Build Settings | |
- Change it to reflect build configurations | |
3. Create User Defined Settings | |
- There is + sign on navigation bar in Build Settings. Click on it & create User Defined Settings as needed | |
- Example: If you need different names on different builds, add setting name APP_DISPLAY_NAME & so on. | |
- You need to use this created settings on info.plist file. Eg, Change Bundle Display Name value to $(APP_DISPLAY_NAME). | |
4. Create any compilation flags if needed. | |
- You can create flags under Active Compilation Code Or Other Swift Flags | |
5. Create Schemes for build configurations | |
- One rule of thumb is to create same number of schemes as per build configuration. So if there are App store & Development build configurations, the number of schemes is also 2. | |
Refer to these two links: | |
1. https://blog.lftechnology.com/multiple-targets-in-xcode-41ef168f7f4 | |
2. https://medium.com/@danielgalasko/run-multiple-versions-of-your-app-on-the-same-device-using-xcode-configurations-1fd3a220c608 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment