O'Reilly logo

iPhone and iPad App 24-Hour Trainer by Gene Backlin, Abhishek Mishra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23

Application Settings

Most applications that perform complex tasks will at some point need to allow users to customize the applications’ operation to suit their specific needs. These customizable options are usually referred to as application preferences or application settings. iOS applications can either expose their preferences within Apple’s Settings application, or provide a user interface within the application where the user can customize them appropriately.

To integrate your application’s preferences with Apple’s Settings application, your application must include a Settings.bundle file. A settings bundle file lets you declare the preferences in your application as a property list and the Settings application provides the user interface for editing those preferences.

Keep in mind that to access the Settings application your users will have to first quit your application if they were using it. In this lesson, you learn to create this file and use it to expose system preferences.

Adding a Settings Bundle

To add a Settings.bundle file to your application, right-click your application’s group in the project navigator and select New File from the context menu. Select the Settings Bundle file type from the iOS Resource section of the dialog box (Figure 23-1).

When the Settings application is launched on an iOS device, every third-party application is checked to see if it has a Settings.bundle file. For each application on the iOS device that has this file, its name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required