Skip to Main Content
Professional iPhone® and iPad™ Application Development
book

Professional iPhone® and iPad™ Application Development

by Gene Backlin
November 2010
Intermediate to advanced content levelIntermediate to advanced
600 pages
14h 21m
English
Wrox
Content preview from Professional iPhone® and iPad™ Application Development

Chapter 10. Data Storage

WHAT'S IN THIS CHAPTER?

  • How to save user-entered information locally in a Property List

  • How to use the Core Data framework

  • Working with the Xcode Data Modeling tool

Imagine you have just designed an application for which you have worked out all the details except one: How can you store information locally?

The data you want to store is not application preferences, which are handled by the settings bundle. The information you want to store is user-entered information. iOS 4 provides two very elegant ways for you to handle this: Property lists and Core Data.

In this chapter you will build an application that stores the first name, last name, and phone contact information in both of these formats. Building the same application in each format highlights the different data storage techniques you can offer in your own applications.

Which format is the right one to use? That depends on your application's needs. For small quantities of data, the XML property list may be the easiest to implement. For larger amounts of data, the Core Data solution may be appropriate.

Keep in mind that the target of your application is a mobile device; it was not designed to house a central warehouse database of enormous size. Apple has provided efficient methods that are more than adequate to handle your data storage needs. For larger storage needs Apple does provide MobileMe as one possible solution.

PROPERTY LISTS

Property lists, which use the extension .plist, are simple XML-formatted files ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo, John Arkontaky, Yat Siu
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo

Publisher Resources

ISBN: 9780470878194Purchase book