Technical Note TN2348

iCloud Drive Migration

iOS 8 and OS X Yosemite introduced iCloud Drive, giving users access to all their documents in iCloud. When installing iOS 8 and OS X Yosemite, users will be presented an option to upgrade to iCloud Drive and will see the upgrade screen during set up time. iCloud Drive is a one-time and one-way upgrade from the current Ubiquity-based Documents and Data.

Introduction
iOS 8
OS X Yosemite
Entitlements
Ubiquity URLs
Document Revision History

Introduction

If a user upgrades their iCloud account from Ubiquity (“Documents in the Cloud”) to iCloud Drive, their documents and data will be moved and their iCloud-enabled applications will work as before.

In all cases, existing apps will continue working without requiring modifications.

iOS 8

OS X Yosemite

OS X Yosemite has only iCloud Drive support. If a developer is using Ubiquity to keep her data up to date between an iOS app and OS X app, their apps will stop synching if the user upgrades to iCloud Drive and has OS X Mavericks or earlier on their Mac.

If a user does not migrate his iCloud account to iCloud Drive, the app will still be able to write documents, but they will not be uploaded to iCloud. Already downloaded documents can be read, but documents that weren't downloaded will just cause file coordination calls to never return.

Entitlements

You may keep both the Ubiquity and Cloud Drive entitlements in your app binary in order to support both Ubiquity and iCloud Drive accounts.

Ubiquity URLs

Do not store NSURLs obtained from NSFileManager as a preference and assume it’s the same location next time.

After you move a document to iCloud, it is not necessary to save a URL to the document’s location persistently. If you manage a document using a UIDocument or NSDocument objects, that object automatically updates its local data structures with the document’s new URL. Because documents can move while in a user’s iCloud storage, you should use an NSMetadataQuery object to search for documents. Searching guarantees that your app has the correct URL for accessing the document. Use NSMetaDataQuery if you need to obtain an NSURL for any particular document or directory.

For more information on finding documents in iCloud, refer to the “File System Programming Guide”, section “Searching for Documents in Cloud” - File System Programming Guide



Document Revision History


DateNotes
2014-09-15

New document that describes the details of iCloud Drive migration.