Contents

About Your Third iOS App

A tutorial that introduces iCloud for iOS apps.

At a Glance

Your Third iOS App builds on the knowledge you gained in <!--a target="_self" -->Your First iOS App<!--/a--> and Your Second iOS App: Storyboards to show you how to incorporate support for storing documents in iCloud.

Configuring Your Project to Use iCloud

Apps that use iCloud must be signed with special entitlements that grant them access to the document storage space in a user’s iCloud account. To set up these entitlements, you modify your project’s configuration and perform several steps in Xcode and the iOS Member Center. Although you can do some of this configuration later in your development cycle, this tutorial addresses these issues first so that you can be assured that your project works correctly later.

Relevant chapters: Getting Started

Managing Your Files Using Document Objects

Document objects are the easiest way to manage files in you store in a user’s iCloud account. Each document object manages a discrete portion of your app’s data and is responsible for writing that data to disk and reading it back into memory at appropriate times. All interactions with that data occur through the interfaces of the document class you define.

Relevant chapters: Defining Your Document Subclass

Building the App’s User Interface

Although iCloud primarily manages your app’s data, your app still needs a user interface to present that data. This tutorial uses two view controllers to present its content. The first displays the list of available documents and manages the creation and deletion of those documents. The second displays the contents of a document and allows you to edit those contents.

Relevant chapters: Implementing the Master View Controller , Implementing the Detail View Controller

Searching for Existing Documents in iCloud

Searching for documents in iCloud is necessary because the list of documents can change while your app is not running. Documents can be created on different devices and the user can delete documents that are no longer needed. Your app uses a metadata query object to search for documents and detect changes to the document list.

Relevant chapters: Searching for iCloud Documents

Solving Problems and Choosing Your Next Steps

As you complete the tasks in this tutorial, you might encounter problems that you do not know how to solve. There are a few common errors that you can look for and it includes code listings that you can compare against the code in your project.

After you finish this tutorial, you should think about ways to improve your app and increase your knowledge.

Relevant chapters: Troubleshooting , Next Steps , Code Listings

Prerequisites

The following tutorials introduce best practices for creating all apps and should be read before this tutorial:

Your Second iOS App: Storyboards

See Also

This tutorial demonstrates only one aspect of app development, namely the adoption of iCloud in your app’s data model and controller layers. For information about other key aspects of app development, see the following documents:

To learn about the recommended approaches to designing the user interface and user experience of an iOS app, see <!--a target="_self" -->iOS Human Interface Guidelines<!--/a--> .

For comprehensive guidance on creating a full-featured iOS app, see App Programming Guide for iOS .

For more detailed information about creating a document-based app, see Document-Based App Programming Guide for iOS .

To learn about all the tasks you need to perform as you prepare to submit your app to the App Store, see <!--a target="_self" -->App Distribution Guide<!--/a--> .

Next

Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-09-18