is it possible to set a compiler flag in Xcode to not compile any source code which is flagged not into the archive (ipa)?!
Maybe just like an if-statement?!
if (shouldBeInAppPackage)
{
//Code in here should be compiled in App Package
}
is it possible to set a compiler flag in Xcode to not compile any source code which is flagged not into the archive (ipa)?!
Maybe just like an if-statement?!
if (shouldBeInAppPackage)
{
//Code in here should be compiled in App Package
}
You can use a pre-processor macro for that. In the pre-compiled header, or some other header file which is imported into the source files you want to use this on, you can define:
#define INCLUDE_IN_BUILD 0
and then wrap code with:
#if INCLUDE_IN_BUILD
code();
code();
#endif
You can then selectively include/exlude that code by changing the 0
to 1
.
Think of a better name than INCLUDE_IN_BUILD
, however.