2
votes

I'm new to iCloud integration, I did found some tutorials but I still couldn't get the solution I want.

I found that there are 3 ways of saving the data to the iCloud

1) Key-Value

2) Core-Data

3) UIDocument

I don't really know which is the best option for me. All I want is just save a few NSDictionary to iCloud. Can anyone tell me how can I do that and which option should I use?

Basically I will have 2 to 3 NSDictionary. Each of NSDictionary might be holding about 50+ pairs of data and I wanna save them into iCloud so that other devices can retrieve the same NSDictionary.

Please help.

1
Use key value. It will be simpliest way.Shmidt
How to use key value? I don't understand.Cadrick Loh
for storing NSDictionary (or any customised) objects, you have to use the UIDocument class.holex
@Flink, in that case the KV way is useless...holex

1 Answers

0
votes

Key Value is limited for small sized amounts of data: the total space available in your app’s iCloud key-value storage is 1 MB per user. The maximum number of keys you can specify is 1024, and the size limit for each value associated with a key is 1 MB. I suggest creating a UIDocument subclass incorporating your NSDictionary objects and use this solution.

A good idea is to begin reading Apple documentation for iCloud storage: https://developer.apple.com/icloud/documentation/