I'm developing an app for the iPad and I have recently added a few settings (like a debug mode switch and an FPS counter switch) to the app's page in Settings.app to make the life of the app testers easier. Of course I don't want to keep these settings there in the final release. Is there a way to hide some of the settings in Settings.bundle in the released version but show them in the debug version? Or, alternatively, is there a way to conditionally use a different Settings.bundle in my app target depending on whether I'm using the release or the debug configuration for compiling the app?
I know this to late, but this may help other people
This is how i solved same problem
if [ "$CONFIGURATION" == "Debug" ];then
rm -f "$SRCROOT/Settings.bundle/Root.plist"
cp "$SRCROOT/Debug/Root.plist" "$SRCROOT/Settings.bundle"
else
rm -f "$SRCROOT/Settings.bundle/Root.plist"
cp "$SRCROOT/Release/Root.plist" "$SRCROOT/Settings.bundle"
You can, in the project build settings, define a C preprocessor macro specific to each configuration. For example, I have -DDEBUG
in debug configuration, which defines the DEBUG
macro. Then, code can be conditionaly compiled with #ifdef DEBUG ... #endif
.
Also, the Info.plist file can be preprocessed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With