When I build my app as an Adhoc, I would like to set a specific var to YES. Is it possible for my code to know what it is being built for, and change a part of the code if it is for debug or adhoc?
When I build my app as an Adhoc, I would like to set a
Share
In the Build Settings for a target you can set preprocessor symbols based on the build type you are doing, then in your code you can test for these using
#ifdef/#endif, or to test for specific values you can use#if. Look up the preprocessor in the docs.For example, this is commonly used to define the symbol
DEBUGfor debug builds and then conditionally include code: