-2

I am starting to implement iCloud, and I would like to prompt the user to set up iCloud account if he doesn't have it set up yet.

How do I do this?

Thanks

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
Denis Balko
  • 1,566
  • 2
  • 15
  • 30

1 Answers1

2

See this question.

So in your case it would be the following bit of code:

NSURL *url=[NSURL URLWithString:@"prefs:root=CASTLE"];
[[UIApplication sharedApplication] openURL:url];
Community
  • 1
  • 1
Stunner
  • 12,025
  • 12
  • 86
  • 145
  • Yes it is: http://developer.apple.com/library/ios/DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/openURL: Please consult the original question I pointed to for more on this solution. – Stunner Apr 28 '13 at 22:01
  • 1
    Huh. Neat! Might be useful. – Undo Apr 28 '13 at 22:09
  • I thought the `prefs:` URL scheme was only available in iOS 5.0 and iOS 5.1 (and it was undocumented). Are you sure this still works? – Sam Spencer Apr 28 '13 at 22:51
  • @RazorSharp is correct. This won't work in iOS 6. – Aaron Brager Apr 29 '13 at 00:51
  • Also, this doesn't answer the question of how to *check* if the user has iCloud enabled. Also, you need a space between `NSURL` and `*url`. – Aaron Brager Apr 29 '13 at 00:52