How to use iCloud key value storage

Storing small bits of info in iCloud is very similar to using the local NSUserDefaults device storage. The only difference is that your App ID needs to be enabled for iCloud in iTunes Connect and that you need to enable it in your project:

Screen Shot 2013-01-10 at 19.00.51

Here’s how you save data to iCloud (from a text label):

And here’s how to retrieve it:

Synchronization takes a few seconds between devices, provided they are connected to the internet. Note that for testing iCloud you need physical devices – the simulator doesn’t work.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.