Testflight – I can judge whether my app is running under Apple Test Flight Beta

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 there is Apple’s Beta test Flight system, we have to build for the App Store, that is 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 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

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:

enter image description here

Then you need to create a new scheme that will run the project in the “beta” configuration. To To create a plan, please visit:

enter image description here

Name this scheme whatever you want. You should edit the settings of this scheme. To do this, click here:

enter image description here

Select the Archive tab, where you can select Build configuration

enter image description here

Then you need to add a project information attribute list with a key value of $(CONFIGURATION), As shown below:

enter image description here

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:

enter image description here

Then you need to create a new scheme that will run the project in a “beta” configuration. To create a plan, please visit:

enter image description here

Name this scheme whatever you want You should edit the settings of this scheme. To do this, click here:

 enter image description here

Select the Archive tab, where you can select Build configuration

enter image description here

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
}

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1188 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.