1

When a user turns on their device, I would like to show a popup to tell them to disable iCloud backup for the app.

Is it possible to detect if the user has backup enabled for my app?

And is it possible to take the user to Settings->iCloud->Storage & Backup->Manage Storage->iPad, which is where the switch to disable the backup resides?

Andrew Johnson
  • 13,108
  • 13
  • 75
  • 116

1 Answers1

1

There's an example here:

http://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW17

Every user with an Apple ID receives a free iCloud account but some users might choose not to enable iCloud for a given device. Before you try to use any other iCloud interfaces, you must call the URLForUbiquityContainerIdentifier: method to determine if iCloud is enabled. This method returns a valid URL when iCloud is enabled (and the specified container directory is available) or nil when iCloud is disabled.

The first time you call the URLForUbiquityContainerIdentifier: method for a given container directory, iOS extends your application sandbox to include that container directory. Thus, it is important that you call this method at least once to ensure that iCloud is enabled and that your main container directory is accessible. And if your application accesses multiple container directories, you should call the method once for each directory.

It implies it should return nil if the directory isn't available in iCloud.

The NSFileManager doc also has this:

containerID [...] If you specify nil, this method returns the first container listed in the com.apple.developer.ubiquity-container-identifiers entitlement.

Return Value

A URL pointing to the specified container directory or nil if the container could not be located or if iCloud storage is unavailable for the current user or device.

The entitlement setting may include the first path by default.

Community
  • 1
  • 1
jspcal
  • 50,847
  • 7
  • 72
  • 76
  • 3
    Doesn't this just tell me if iCloud is enabled? The user could have iCloud enabled, but not have backups within iCloud enabled. – Andrew Johnson Oct 15 '11 at 02:21