Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Settings > Settings Bundle

Settings Bundle

In the top-level directory of an iPhone application bundle, the filename Settings.bundle is reserved for a directory to contain the application’s preference settings. To add preferences to your application, you add a Settings.bundle directory to your application. This directory must contain a file, Root.plist, where you set key-value pairs to define the application preferences. Once you’ve done this, your application will have its own pane in the Settings application where the user can set these preferences.

XCode makes it very easy to add a Settings.bundle to an application. Reopen Nayberz.xcodeproj. From the File menu, select New File.... In the table on the left side, under the iPhone OS group, select Resource. Then in the table on the right side, select Settings Bundle and click Next. The next screen will let you change the File Name and Location, but don’t change them. Just be sure that the Add to Project: field is set to Nayberz and Targets: Nayberz is checked before you click Finish.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint