Note that there are some explanatory texts on larger screens.

plurals
  1. POiCloud: can I ignore those who disable iCloud?
    primarykey
    data
    text
    <p>I'm struggling a bit with the idea of iCloud and posted a more general question <a href="https://stackoverflow.com/questions/7795629/icloud-basics-local-app-sandbox-vs-cloud-sandbox-on-device">here</a>. My biggest problem is to decide whether I should stop putting the user's data in the good old documents folder which is found in the app's sandbox. To illustrate my problem:</p> <p><img src="https://i.stack.imgur.com/8mmHl.png" alt="enter image description here"></p> <p>The <a href="http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW10" rel="nofollow noreferrer">docs</a> don't give an answer as far as I can see. Let's suppose I have an App which handles different txt files. Once I start my app, I simply check if any txt files are in the cloud like so:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"AppDelegate: app did finish launching"); self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; // (1) iCloud: init NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; if (ubiq) { NSLog(@"User has iCloud enabled! Let's get the txt files from the cloud."); [self loadDocument]; } else { NSLog(@"User doesn't have iCloud enabled. App is thus worthless."); } return YES; } </code></pre> <p>I then have a method to check if there are any txt files in the cloud and if so, load them. If not, I simply create new txt files in the cloud.</p> <p>This means that the app does not store any data in the documents folder. As far as I understand it, everything is either in the local iCloud storage of my device (which is also accessible if the user is OFFLINE) or in the cloud. So the text file exists in two places: on my device and the cloud.</p> <p><strong>So there is simply no need to store a third copy in my local documents folder, right? Or is this essential for some reason I have overlooked? In other words, for what should I use the local documents folder if I offer iCloud to my users? (And can I simply ignore those who won't sign up for iCloud?)</strong></p> <hr> <p>EDIT: Just to clarify, when I'm talking about the standard documents folder in the app's sandbox, I mean this one:</p> <pre><code>NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload