Determine availability of iCloud Key Value Store

后端 未结 1 1038
无人及你
无人及你 2021-01-02 20:15

I am working on OSX 10.8 application that uses iCloud Key Value store. It does not use Document storage.

I would like to determine if iCloud Key Val

相关标签:
1条回答
  • 2021-01-02 20:47

    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).

    0 讨论(0)
提交回复
热议问题