Can I Hide/Disable fields in Settings.bundle? Can I Hide/Disable fields in Settings.bundle? xcode xcode

Can I Hide/Disable fields in Settings.bundle?


Sure you can. Just change the item type to title.

You still can save and read it's value from code. but, it will not appear in the app. settings.


After further research I have found the answer to my question, and the answer to the problem I am trying to solve.

Question: Can you hide/disable fields in Settings.bundle/Root.plist?
Answer: No.

Problem: How do I securely store authentication information for my app?
Answer: Built in Keychain services.

Source: Keychain Services Tasks for iOS


Short answer, you can't. Long answer: I presume you are using the Root.plist somewhere else inside your app, is that right? If so, what I'd recommend in this case, if you really need it to work the way you described, is to create two plist files, and merge them at runtime.

In other words, create Root.plist with only the fields you want the user to change in the iOS settings page (e.g, without the field you are currently trying to hide), and another .plist file with the rest of the fields you want to handle inside your app.

Then, at runtime, you first load Root.plist, and then merge the contents of the another .plist file in the data structure you'll be using.

Not very slick, but could possible work.