Is there a way to check if the build is in Adhoc, release, distribution programmatically?

As in the header, I need a way to determine if the assembly is in adhoc, release, or distribution, since I use keychain-access groups for each type of assembly. I use a different condition, so the package seed identifier is different. I just need an efficient way to switch this to a specific assembly.

+7
source share
2 answers

Go to the goal you want to test, then make settings and search for preprocessing, and you will see the following:

enter image description here

As you can see, debug already matters. You can enter RELEASE = 1 if you want to check the release build. Then, in your code, a drop in the if statement follows:

#if DEBUG==1 // do debug build settings stuff there #endif #if RELEASE==1 // do release build settings stuff there #endif 
+13
source

Perhaps you can use the custom build configuration (aka define), which will have different values ​​in different build configurations?

0
source

All Articles