Chapter 9. Application Preferences

WHAT'S IN THIS CHAPTER?

  • The role of the Settings.bundle file in processing application preferences

  • How to read from and write to the application preferences

  • Using child panes to define a hierarchy of application preferences

Applications can be configured through preferences. In desktop applications, preference activity is coded as part of the application itself. With the iPhone and iPad, these settings are not part of the actual applications; rather, they are found in a separate Settings application.

In order to integrate with the Settings application, you must include a Settings.bundle file in your application. This bundle works directly with the Settings application, which is responsible for maintaining the values that are provided to your application. At runtime, your application can easily retrieve these settings.

In this chapter you develop two applications that store information that can be modified by the standard Settings application (found on the iPhone and iPad devices).

The first application will retrieve first name, last name, and phone number information that is located in the Settings.bundle and display the values in a Table view.

The second application will retrieve first name, last name, and bank account type information that is located in the Settings.bundle and display the values in a Table view. What makes the second application different is that the bank account information is stored in a separate settings page file, demonstrating the ...

Get Professional iPhone® and iPad™ Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.