Question

I am trying to add a plist file to the Settings.bundle in my iOS project programmatically. How would I go about doing this?

I used Apple's API to find where to put a created plist file to see if the Settings.bundle would check there for a plist file but it doesn't recognize it and the child pane goes to a blank screen instead of showing the settings.

The reason for this is based on the user logging in to my app I want to have different settings show in the Settings App

Était-ce utile?

La solution

You don't. Settings.bundle is supposed to be created at compile time, and is fixed (as well as signed as part of the application build process.)

See the Settings.bundle documentation which explicitly states (emphasis added):

A Settings bundle has the name Settings.bundle and resides in the top-level directory of your app’s bundle.

The emphasized part is what tells me you can't put the bundle anywhere else. This answer confirms what I just said.

Conditionally displayed settings are also not possible.

Autres conseils

I don't think you can. The OS handles that independently, and you aren't allowed to run any code to affect it.

Instead, you are going to want to offer a settings screen within your app that allows full control over the presentation and function.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top