Stefano Verna
Stefano Verna

Reputation: 642

How to simplify in app Application Settings management?

I'm sure every cocoa-touch programmer had to face this: I know Apple would like every application to place their settings in the Settings app. But it's quite limiting in what it offers, in terms of customization. Also, it's better to place some settings within the app, as they change frequently.
In such cases, the developer has to implement settings management within its own application. The thing is that it's quite an overkill to reimplement all the basic stuff that could be easily managed in the Settings app with a simple plist. Is there some kind of framework/library that has already been created to simplify things, that maybe could take as an input a similar plist?
In general, how do you implement in app-settings? Do you override UITableViewControllers each time?

Upvotes: 7

Views: 3631

Answers (3)

Stephen Darlington
Stephen Darlington

Reputation: 52565

Have you seen mySettings? Uses almost the same plist file as you can use in the Settings app but displays it inside your app.

Incidentally, Apple recommends including frequently changed settings inside your application. Other stuff should be in the Settings app.

Upvotes: 4

Ed Marty
Ed Marty

Reputation: 39690

The way we've gone about it has been to create a library that emulates the Settings app as exactly as possibly, accessible from within the app. It uses the Settings.plist file user defaults in the same way the Settings app does.

Once you have that implemented, you can add your own data types as you see the need.

Upvotes: 0

rhess
rhess

Reputation: 93

If you're writing data driven applications, you could keep settings in the database, and have a single View/Controller pair that queries the DB for any settings that can be modified (each setting could be type/name/value or any other structure you could come up with).

If your data access uses a singleton, accessing the settings from anywhere in the app is simple.

Between different applications, the View/Controller used as the settings view and the database code itself wouldn't change, only the set/get performed in the different parts of the application (as well as perhaps the starting data in the DB).

Of course, if you weren't going to touch CoreData otherwise, this is a lot of overhead for settings...

Upvotes: 0

Related Questions