Search code examples
iosprocessapp-store-connectstaging

iOS / appstoreconnect process for staged application


I am developing an application for the appstore which we currently have two stages for in our backend (dev & prod) and in the future plan to have three, dev, qa and prod.

To build the same via environment variables I managed already within the application in xcode and can switch between those as I want.

My challenge now is to reflect the same in appstoreconnect.

There I am actually only seeing the different versions, which is great, but I am really missing a way or process to reflect that I am using one of the stages (dev, qa, prod). Is there any way to do this? Or do I have to create an app for every stage to be sure?


Solution

  • there are different approaches that you could follow. In first place I recommend using TestFlight so that you can easily manage/share/test a build with a group of people that you select. To my mind there are a couple of approaches you could start exploring with:

    1. creating a different target in Xcode for each environment you wanna deploy in TestFlight. To make them visually recognizable, you could bind a different app icon set to the target (Assets_Dev.xcassets, Assets_Prod.xcassets,..) via the “target memberships” ( which will then show up the list of existing target you previously created in your Xcode project

    2. an extension/alternative way than the previous one, (let’s assume that the only difference between the environments are just the remote endpoints used by your app to connect to your servers), would be that you make a target “non prod” into which the app has maybe a view controller or something that allows you to switch environments programmatically on the fly without having a distinct build for each of them. Such view should not be part of the acutal prod target as its purpose is merely for internal use and not for the end user (so making use of user defined keys which exist maybe only in the non prod target, and checking them with the “#if <YOUR_NON_PROD_USER_DEFINED_KEY … code to show the view for switching envs … #endif”