Created
January 2, 2014 05:27
-
-
Save keicoder/8215393 to your computer and use it in GitHub Desktop.
objective-c : iCloud Setup on AppDelegate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iCloud Setup on AppDelegate | |
| - (void)setupiCloud | |
| { | |
| dispatch_queue_t background_queue = | |
| dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, | |
| 0); | |
| dispatch_async(background_queue, ^{ | |
| NSFileManager *fileManager = | |
| [NSFileManager defaultManager]; | |
| NSURL *iCloudURL = | |
| [fileManager URLForUbiquityContainerIdentifier:nil]; | |
| if (iCloudURL != nil) { | |
| NSLog(@"iCloud URL is available"); | |
| } | |
| else | |
| { | |
| NSLog(@"iCloud URL is NOT available"); | |
| } | |
| }); | |
| } | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| [self setupiCloud]; | |
| return YES; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment