I'm trying to exclude the IDFA from my final binary using Countly so I can answer no to the Export Compliance question "Does your app use the IDFA?".
Adding COUNTLY_EXCLUDE_IDFA=1
to Build Settings > Preprocessor Macros
as mentioned here doesn't work.
I've narrowed it down to #ifndef
not behaving as expected. This is what I've tried:
With COUNTLY_EXCLUDE_IDFA=1
added in Build Settings > Preprocessor Macros
:
#ifndef COUNTLY_EXCLUDE_IDFA
printf("!EXCLUDED\n");
#else
printf("EXCLUDED\n");
#endif
>> prints !EXCLUDED
With COUNTLY_EXCLUDE_IDFA
not defined in Build Settings > Preprocessor Macros
:
#ifndef COUNTLY_EXCLUDE_IDFA
printf("!EXCLUDED\n");
#else
printf("EXCLUDED\n");
#endif
>> prints !EXCLUDED
I expect #ifndef
to include a block if the Macro is not defined. Now the #ifndef
block is included wether or not I have the Macro defined in Build Settings > Preprocessor Macros
.