I am an iOS development newbie. I am implementing some sample code, but try as I might I do not see my NSUserDefault settings on the settings page. What needs to be done for that? Also, where do you specify the UI for the settings page?
You need to define your settings bundle, see http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/Preferences/Preferences.html
Related
I have a settings bundle in my app and I want user can edit settings in app. I dont know how to do it with PSMultiValue. How to load the array for the table and how to save it.
Thank you
Wenn you define a Settings.bundle the settings will be avialable in the iPhone settings section. It will handling saving and updating for you.
Read Implementing Application Preferences
To get the same settings view within your app you can use InAppSettingsKit.
I have created an iOS 4.0 app with a Settings bundle. I am using the InAppSettingsKit (http://www.inappsettingskit.com) which presents the settings in the app. This allows the user to modify those settings directly from within the app, without the need to go to the external iPhone Settings.app. As the settings are accessible from inside the app (and I am doing some custom styling to the in-app settings screen) I would like to stop the Settings bundle from appearing in the iPhone Settings.app. Is this possible?
Any help would be greatly appreciated.
InAppSettingKit allows the use of an internal only settings bundle. Rename Settings.bundle to be this and then the OS wont find it to put it in the Main Settings part
Check out "Some little extras" on the product page
I've seen there is a library called InAppSettingsKit - http://www.inappsettingskit.com/ - which lets your in-app settings mimic your settings within the Settings app.
But is there a way to get this to NOT use the Settings app as well? So it just allows you to change settings within the app. Or is there another library which does this?
InAppSettingKit lets you use a local bundle for the in-app part (see documentation) Try only including this and not including the Settings.bundle
Is there a way to launch the iPhone/iPad's settings from within your app?
Check this out: It is a framework to display the apps's settings in both places, or just just on the app using the same type of display as the settings pane.
There is no way to do this. What apps usually do is recreate the same view the user would see if they opened the settings and then display that in-app.
I'm building an iphone app, and I wanna use the iPhone's built in Preferences stuff. It looks like I put options in there, but I'm interested in putting a Reset button in the Prefs. I see that Apple's built-in apps like Safari have buttons in their prefs (Clear History, Clear Cookies, etc). I don't see a way to do this for SDK apps. Help!
Your Settings bundle cannot contain any runnable code, so it's not possible to have buttons like safari (Clear History, Clear Cookies, etc).
Safari is a builtin application provided by Apple, therefore it has access to apis/privileges that normal AppStore applications don't.
You can see the list of possible elements here.
One thing you can do, since you can set your own app's preferences during runtime, is create a "Reset preferences on next run" toggle.
When your app starts up, check for this setting and act accordingly if it is set to "On". Don't forget to reset the toggle as well. ;-)
Here's a Q&A that explains how to do this: How to change the app preference settings through code?