Is there any way in iOS to do it? It is detected that the build is a build delivered by Test Flight, so we know “this is beta” and use AdHoc compiler constants to perform the same operations as before?
Thank you
In Xcode, go to the project settings (project, not target) and add the “beta” configuration to the list:
Then you need to create a new scheme that will run the project in the “beta” configuration. To To create a plan, please visit:
Name this scheme whatever you want. You should edit the settings of this scheme. To do this, click here:
Select the Archive tab, where you can select Build configuration
Then you need to add a project information attribute list with a key value of $(CONFIGURATION), As shown below:
Then You need to do something specific to the beta version in the code:
let confi g = 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
)
In the previous test flight system, we promoted the AdHoc build, and we used compiler constants to identify the on/off functions of our beta testers. Now that we have Apple’s Beta test flight system, we have to build for the App Store, i.e. not AdHoc, which is good, as if it is tested well, we can use the same build for production review.
Is there any way in iOS to detect that the build is delivered by Test Flight, so we know “this is beta” and use AdHoc compiler constants to perform the same operations as before?
Thank you
There is a way to use it for my project.
In Xcode , Go to the project settings (project, not target) and add the “beta” configuration to the list:
Then you need to create a new scheme that will run the project in a “beta” configuration. To create a plan, please visit:
Name this scheme whatever you want You should edit the settings of this scheme. To do this, click here:
Select the Archive tab, where you can select Build configuration
Then you need to add a project information attribute list with a key value of $(CONFIGURATION), as shown below:
< img src="/wp-content/uploads/images/hardware/macbook/1626799836258.png" alt="enter image description here" >
Then you need to execute the beta version specific in the code Things:
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
}