AppDelegate

AppDelegate manages the most basic iCloud functionality: determining whether the user wants to use it and whether or not it is available. Listing 15.1 shows AppDelegate.h.

Listing 15.1 AppDelegate.h

#import <UIKit/UIKit.h>@interface JFAppDelegate : UIResponder <UIApplicationDelegate,  UIAlertViewDelegate>                                                   //1@property (strong, nonatomic) UIWindow *window;                          //2@property (readonly) BOOL documentsIniCloud;                             //3@end

1    This code is almost the same as it was in Placid. You’ll need to conform to UIAlertViewDelegate because you’ll have an alert that asks the user about using iCloud or local storage on the ...

Get Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X 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.