In your xcode settings, you might have seen the configurations as shown below:
You can find the current configuration :
xcodebuild -workspace test.xcworkspace -scheme “UXtests” -showBuildSettings
You would use it in the code as follows :
#ifdef TESTING
// do something
#endif
But how would you apply the debug and testing configurations. These preprocessor statements can’t be applied when you run your project by running command + r. These can be used through the command line as follows:
xcodebuild -workspace Test.xcworkspace -scheme “ux tests” -derivedDataPath build/DerivedData -configuration Testing
Thats how you use it. Next time someone asks you, remember this.
Leave a Reply