Can I find out if my app works under beta version of Apple Test Flight

In the previous flight test system, we pushed AdHoc assemblies that used the compiler constant to identify on / off functions for our beta testers. Now with the Apple beta testing system, we have to create for the App Store, i.e. Not AdHoc, and this is normal, as if it was well tested, we can use the same assembly to review production.

Is there any way from iOS to find that the assembly is a Test Flight assembly, so we know that it’s beta, and do the same thing as before with the AdHoc compiler constant?

thank

+5
source share
2 answers

.

Xcode (, ) "":

enter image description here



, "". , :

enter image description here



, . . , :

enter image description here



"", Build configuration

enter image description here



Config $(CONFIGURATION) , :

enter image description here



, , - -:

let config = Bundle.main.object(forInfoDictionaryKey: "Config") as! String
if config == "Debug" {
  // app running in debug configuration
}
else if config == "Release" {
  // app running in release configuration
}
else if config == "Beta" {
  // app running in beta configuration
}
+1

, , , TestFlight:

func isTestFlight() -> Bool {
    guard let path = Bundle.main.appStoreReceiptURL?.path else {
        return false
    }
    return path.contains("sandboxReceipt")
}

, ..

0

All Articles