Data Management Starting Point

Data management involves the creation and handling of various types of data, including strings, text, binary data, dates, collections, property lists, and XML data. You also use data management APIs to store and access data in local databases, files, folders, and bundles.

image: Art/DataManagementSP.png


Get Up and Running

Start by reading the programming guide that corresponds to the data type you want to use and refer to Foundation Framework Reference for Objective-C class details and Core Foundation Framework Reference for C-based API details. It’s your choice whether to use the Foundation framework Objective-C data management classes or the Core Foundation framework C opaque type equivalents.

Explore Foundation Framework Reference for classes that also interact with the file system. Also read Low-Level File Management Programming Topics for methods and functions that manipulate files and folders.

Become Proficient

Once you use basic data objects and types in your application, you might want to manipulate and store them.

To learn about data formatting, read Data Formatting Guide or Data Formatting Guide for Core Foundation.

You can also sort collections of objects described in Sort Descriptor Programming Topics.

Read Predicate Programming Guide to learn how to create queries in Cocoa. Predicates can be applied to collections and not just to Core Data or Spotlight.

There are different ways to store data objects and types as well. Read Archives and Serializations Programming Guide for how to store a collection of interrelated objects and values.

Read Bundle Programming Guide for how to access data stored in a file structure called a bundle.

Read Property List Programming Guide or Property List Programming Topics for Core Foundation for how to organize data into named values and lists of values. You can optionally save a property list as XML data. See the sample code project TheElements, a native iOS application that uses a property list to store chemical element data.

To learn how to use Core Data for general object graph management and persistency, follow the advice outlined in Core Data Starting Point.

Provide Application-Level Preferences

Preferences are settings used to configure the behavior or appearance of an application.

Read Implementing Application Preferences in App Programming Guide for iOS to learn how to display application-level preferences using the system-supplied Settings application.

If you need more flexibility than that offered by the Settings application, you can manage preferences within your application using the NSUserDefaults class in the Foundation framework. For more information, see Preferences and Settings Programming Guide. If you prefer using Core Foundation, read Preferences Programming Topics for Core Foundation.

Access Contact Information

Contacts is a centralized database for contact and other personal information for people. Contact information is important for software such as email and chat programs.

Read Address Book Programming Guide for iOS to learn how to leverage the contacts database in your application. You can not only access a user’s contact data but also design and implement your own properties and actions for the data. Refer to Address Book Framework Reference for details.