Skip to content
iRare Media edited this page Nov 24, 2013 · 5 revisions

Adding iCloud Document sync to your project is easy. Follow these steps to get everything up and running.

  1. Add the iCloud.framework to your project

  2. Import iCloud, #import <iCloud/iCloud.h>, in the header file of any class with which you wish to use iCloud Document Sync.

  3. Add the <iCloudDelegate> delegate to any classes that you want to use the iCloud delegate with.

  4. Setup iCloud when your app starts:

     iCloud *cloud = [[iCloud sharedCloud] init]; // This will begin the sync process, register for document updates, setup your ubiquity container, and verify iCloud.
     [cloud setDelegate:self];  // Set this if you plan to use the delegate, which is very useful
    
  5. Use it!


Return to Table of Contents