![]() CFBundleDisplayName and CFBundleName to set the development version app name.XSAppIconAssets to use the new icon asset for the development version.4-Configure iOS projectġ- Copy the ist file then paste and rename it to istĢ- Go to the Asset file, create a new set AppIcon and name it AppIconDev.Īdd your development version icons in the AppIconDev asset.ģ- Go to the ist file and change: ![]() csproj file by default it uses AndroidManifest.xml so for the Debug and Release-Dev configurations we are going to change it to use AndroidManifestDev.xml instead by adding the following to those configurations: android:icon – the development app nameģ-In the MainActivity we will compare by using the created DEV symbol to change the application icon/name based on the configuration selected.Ĥ-In the Android.android:label – the development app name.package – the development package name (it must be different from the one in the original AndroidManifest.xml).3-Configure Android projectġ- Copy the AndroidManifest.xml file then paste and rename it to AndroidManifestDev.xmlĢ- Edit the new AndroidManifestDev.xml file with development environment values We won’t be using the symbol on iOS project, so isn’t necessary to do the steps above. Add it to the Release-Dev and Debug configurations Now we can use the new symbol in our code:Īs the representation of pointing to a specific environment, we will just set a label text to DEV/PROD and change the background depending on which environment is pointing to based on the selected configuration.ĭo the same steps we did for the common project. So we will add it just to Debug and Release-Dev.ġ-Go to the Compiler section, in configuration select Debug and in the Define Symbols add a new symbol called DEV.Ģ-Do the same previous step but selecting Release-Dev in Configuration. This new symbol will be only added to the development configurations because it will point to the development environment. The next step is to create a new compilation symbol so we can use it in the code to set the environment. Choose Debug-Prod, associate it to each one and do the same for each platform.ĭo the same using Release-Dev configuration associate it to each one, and also in each platform. Now we are going to associate the new solution configurations to the configurations created in Common/Android/iOS. Check here we have 2 configurations more than iOS, copy and create a new configuration for each one.Ĭlick on ok, then open the Configurations options again, click on Configuration Mappings. We will start with the Release-Dev configuration.ģ-Copy the Release configuration (Select current Release configuration and click on the copy) and name it Release-Dev (or any name you prefer).Ĥ-Copy the Debug configuration (Select current Debug configuration and click on the copy) and name it Debug-Prod (or any name you prefer).ĭo the same steps in the Android project to add these two new configurations.ĭo the same steps in the iOS project but also consider to specify the platform when adding a new configuration which could be iPhone/ iPhoneSimulator, make sure to create one for each.ĭo the same steps in the solution (Doing right-click in the solution). Debug-Prod config: This config will set the application to a production environment and will allow us to debug our app in production.ġ- Open the configuration menu in the common project by doing right-click on the project and clicking on Options.Ģ-On the Build section go to Configurations.Release-Dev config: Thig config will set the application to a development environment and will allow us to test new features and bug fixes before we release to production.Let’s Startįirst, we are going to create two new configurations in the application: In this article, I will show you a step by step guide of doing just that by using the solution configurations. ![]() So in order to be able to test both on the same device, we need to be able to install the same application pointing to each environment. Usually, we have at least two environments: development and production.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |