Determine availability of iCloud Key Value Store

给你一囗甜甜゛ 提交于 2019-11-30 15:28:05

The iCloud Fundamentals guide has a table that compares Document Storage to the Key-Value Store(Table 1-1). In contrary to Mobile Documents, the Key Value Store should be considered Always effectivly available.

The [NSUbiquitousKeyValueStore defaultStore] also isn't nil when iCloud is not enabled, and it even stores key/value pairs - It just doesn't upload them to the iCloud server. From the NSUbiquitousKeyValueStore's point of view there is little difference between offline and logged-out.

You also have to keep in mind that already stored values are pushed to the server as soon as the device attaches to the account. It might be necessary to handle conflicts (if the default last-one-wins strategy doesn't work for your use case).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!