SUMMARY

In this chapter, you had a good look at how you can store your documents and data on iCloud. Using iCloud, you can automatically synchronize your documents and data across applications running on multiple devices. Best of all, the iOS SDK provides the UIDocument class, which provides all the heavy-lifting needed to ensure that documents are synced and updated correctly, thus leaving you with more time to develop your application.

EXERCISES

  1. Name the method you can use to obtain the path of your iCloud storage container.
  2. What is the advantage of saving your documents in the Documents folder of your iCloud storage container?.
  3. What is the advantage of storing key-value data on iCloud?

Answers to the exercises can be found in Appendix D.

imageWHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Two main uses for iCloud Use for document storage and data storage.
Setting entitlements for iCloud Set the iCloud Containers entitlement and the iCloud Key-Value Store entitlement.
Managing iCloud documents Subclass the UIDocument class.
Methods to implement in subclass of UIDocument The three methods are:initWithFileURL:loadFromContents:ofType:error:contentsForType:error:
Create a Documents folder in iCloud to store your documents Doing so allows users to manage the files directly through the Settings application.
Storing key-value data on iCloud Use the NSUbiquitousKeyValueStore ...

Get Beginning iOS 5 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.