Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 15. Working with Apple’s iCloud > Storing Documents in the Cloud

Storing Documents in the Cloud

Storing documents in the cloud is a little more complicated than storing key-value pairs, but fortunately, the iCloud document storage APIs still keep things fairly simple for developers, especially when compared to the alternative of hosting your own cloud server to support document sharing in your application.

To create a document in iCloud, you must first create a document locally on the disk of the device on which your app is running. After you have a physical file on disk, you can move that file into iCloud by making it ubiquitous. This moves the file from its original location to a special folder on your computer (probably in a location like /Users/(user)/Library/Mobile Documents/(iCloud container ID)). From there, a special synchronization daemon pulls changes to that document from iCloud and makes those changes to the document. Additionally, changes to that local document are propagated to iCloud by this same daemon.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial