I need to have a settings.bundle in our debug build, but don't want to have it in our Release. How do I approach this? Is there a runscript I can use to remove it from the copy bundle resources building phase?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- Pass custom debug information to Microsoft bot fra
- how do you prevent page scroll in textarea on mobi
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- How do I get to see DbgPrint output from my kernel
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
Alternatively, just don't include the settings bundle in the "Copy Bundle Resources" and add a build phase run script to only include it for certain configs.
Here's a run script that also updates a version and build in the settings bundle
making sure to change out the
Blah/Supporting Files
path to whatever yours actually isYou can write a script to delete the setting bundle altogether for a certain build configuration. For the target, under "Build Settings", there is an option to run a script. This script should do what you need:
The "shell" field can read "/bin/sh"
Found it. I've created a RunScript as the last phase in my build phases. In there, I remove all entries in the settings plist and replace it with a version number. This way, I can use the settings.bundle root.plist as settings for my debug project (to be able to define which test server to use or any other thing that would be specify-able in a debug build). So, when you build debug, the root.plist is what you expect it to be. When you run the Release build, the contents get replaced with the CFBundleVersion information of your info.plist. All debug related choices are gone.