1

Our service endpoints are currently hard coded in our app. We have multiple environments, dev-test, UAT and Live.

We want to leverage TestFlight for our UAT stage, however this would not be the version we can push live, as the service endpoint within the app would need to be swapped for the Live endpoint.

Is there anyway to provide configuration for your app that can be set to one value in TestFlight, and another in Live?

Tom Bowen
  • 8,214
  • 4
  • 22
  • 42
  • Probably the simplest way is to upload a build for testing (with testing configuration), then, once you are happy, upload a new build with production configuration but otherwise identical source code, and release that – Paulw11 Feb 04 '19 at 09:49
  • That's our current process, but it seems to be counter to what you want to achieve here. Knowing the version going live is exactly the same as what is tested. The less human input, the less chance for error – Tom Bowen Feb 04 '19 at 09:54

1 Answers1

0

Actually, there seems to be a way to actually differ Testflight from App Store, at least for the moment:

func isTestflight() -> Bool {
    guard let receiptURL = Bundle.main.appStoreReceiptURL else {
        return false
    }

    return receiptURL.lastPathComponent == "sandboxReceipt"
}

Source: https://mobile.twitter.com/kraustifer/status/1090773523860058112

Adis
  • 4,512
  • 2
  • 33
  • 40