One of the iPhone apps I work on doesn't currently have a Settings.bundle in its project.
I want to add some debug settings in a Settings.bundle for our QA department, so they can enter different server URLs used for web services (so they can point at production, staging, dev, etc.).
For our final App Store build, I don't want there to be any settings for the app shown in Settings.app on the iPhone.
I tried an additional build step for the App Store build that would delete the Settings.bundle, but Xcode will then give an error that it can't find the file.
I tried an additional build step for the App Store build that would delete all but the root element from Settings.bundle/Root.plist, but that results in the app showing up in Settings.app, but no preferences show up when you navigate the开发者_Python百科re.
I thought about creating a target just for the App Store build, that way I can uncheck Settings.bundle from being included for that target, but then I have to maintain build settings on both targets (yuck!).
Any other ideas?
I would suggest making the settings be accessible from within the application. It's simpler to remove, and you don't have to deal with having two different build targets (the only thing that I can think of too).
Another option to try: Rather than deleting the settings file, try replacing it with an empty file. I don't know if that will still show an empty settings screen or if it will get rid of it entirely.
Here is link to solution of your problem : How can I prevent using the Settings.bundle in Release build v.s. Debug build?
I just deleted the settings bundle when in release.
精彩评论