views:

184

answers:

3

I have my user preferences set to display in the system-settings application BUT I want to give them the option of adding additional settings.

Specifically, the user has a group 'favorites' in the settings bundle and they then can put in the details of their three favorite contacts. However, I want to give the user the option of adding more.

I know how to do this with inapp but can this be done through the settings application?

A: 

You would need to add a Settings bundle to your app. Read Apple's document on Application Settings for details on how to set this up:

http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationSettings/ApplicationSettings.html

The Settings app will look for your Settings bundle and load it when it starts up.

jlehr
Is there any way to set values in my settings.bundle/root.plist file from within my app? I would like to guide the user through a setup process within my app that would set the default values. I'd like to do it this way because the default values are user specific and once the values are set, changing them again in-app is very inconvenient.
Eytan
A: 

The settings layout visible in the Settings app is defined by your Settings bundle and can't be changed by your application. Your best bet is to move your settings inside your application.

rpetrich
A: 

The AppPrefs sample app lays it out nice and succinctly too:

http://developer.apple.com/iphone/prerelease/library/samplecode/AppPrefs/Introduction/Intro.html

Joost Schuur
Hey, thanks for linking me to that sample project. It gave me a better understandings of how to use the settings bundle, although I still wasn't able to do exactly what I intended. What I'm trying to do is SET the defaultValue in the settings.bundle/root.plist file INSIDE my application. I'm doing this because the default values are user specific and I intend to prompt the user for them the first time the applicaton is launched, set them in the settings.bundle/root.plist file and from then let the user use the settings application to make further changes.
Eytan
I'm brand new to iPhone development myself, so I don't know the best way to do what you're attempting. I just happened to find a sample app just before reading your question.
Joost Schuur