Using the preprocessor to conditional include segments of Plist files

It common for all but the most trivial applications to conditionally compile parts of the code to enable/disable features or change configurations. Changing the server endpoint URL or enabling a feature to prominent show current version for QA only releases is quite common.

This can be easily done using Swift’s Active Complication Conditions or using preprocessor tokens in Objective-C. So as far as the source code we have a solution for conditionally including parts, but how about plist files, or in general other text resources? How can you run the preprocessor to any plist file so that you can write something like this

   <key>DefaultValue</key>
#if FIREBASE_PERFORMANCE_COLLECTION_ENABLED==1
    <true/>
#else
    <false/>
#endif
Continue reading Using the preprocessor to conditional include segments of Plist files