Debug mode on iOS
-
29-10-2019 - |
Frage
been researching this a while and not sure entirely what to do.
I want to allow users to switch debug mode either on or off. With debug mode on NSLogs will be printed to console.
currently I can set debug mode on or off in the build settings using a preprocessor (DEBUG) and I use the following code to "block" NSLogs.
#ifdef DEBUG
NSLog(@"If you can see this then debug is on");
#endif
I have created a toggle switch in the settings page to get input from the user but I don't know how to use this input to then undefined/redefine DEBUG. Any ideas?
I am not sure if this is even possible so any alternate solutions would also be appreciated.
Many Thanks :)
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow