Check that:
- (BOOL) iCloudCheckContent{
NSString* backupName = @"myBackup";
NSError *error = nil;
NSFileManager *filemanager = [NSFileManager defaultManager];
NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
if (ubiq == nil) {
NSlog(@"No iCloud");
return NO;
}
bool ret = [filemanager startDownloadingUbiquitousItemAtURL:[[ubiq URLByAppendingPathComponent:@"Documents" isDirectory:true] URLByAppendingPathComponent:backupName] error:&error];
NSLog(@"Started for %@ %d", backupName, ret);
if (error != nil) {
NSLog(@"iCloud error: %@", [error localizedDescription]);
}
return ret;
}