TestFlight vs Production Version

Does anybody know is there some way to figure out if it’s running testFlight application or production version. I need to use different connections and URLs in different cases.

Possible alternative is to use two different provisioning profiles maybe. I tried to create separate provisioning profile, but XCode refuses to use it, it always picks

regular distribution profile when I try to upload build to an iTunesConnect.

Thanks in advance

Just add a variable:


let TestFlight = true


When put in production:


let TestFlight = false


Then check that when running.

You can be running the exact same binary installed via TestFlight at the same time as other devices are running it from the App Store. This "solution" only works if you don't actually test your release build using TestFlight (never a good testing strategy).

TestFlight is generally intended to be run in a production environment which is the same as apps distributed through the App Store. For example, that is why it uses production iCloud servers


It is not intended as a general development environment distribution mechanism. I think ad hoc delivery may be more suitable for what you describe.

However, TestFlight does not allow credit cards to be charged.

So if we run an online game where consumable balances e.g. a currency is stored on our servers, then users could just get a bunch of free currency using testflight without ever being charged.

If TestFlight is "generally intended to be run in a production environment", why don't they allow real in-app purchases?

What is the solution to this?

TestFlight vs Production Version
 
 
Q