objective-c – NSUbiquitousKeyValueStore最大大小

NSUbiquitousKeyValueStore的最大大小是多少?

我看到了相互矛盾的报道,例如current iOS documentation says 1mb

但是,如果您在Google上搜索,则可以看到许多对最大大小为64kb的引用:

> Sync preference data with
iCloud

> Beginning IOS 5 Application
Development

我很确定答案是它曾经是64kb并且在某些时候增加了.
有没有人知道是否是这种情况,如果是这样的话,如果进行了更改,是否会影响所有设备或仅影响特定iOS上的设备(例如5.1而不是5.0?)

最佳答案 Apple说:

The key-value store is not intended for storing large amounts of data.
It is intended for storing configuration data, preferences, and small
amounts of app-related data

这让我想到,如果你问这个问题,你可能不应该使用键值存储.

话虽如此,苹果只有updated their documentation更新,更高的限制:

We’ve increased the storage limits for iCloud Key Value Store so you
can provide an even better experience in your app. Now, the total Key
Value Storage limit is 1 MB per app, the single key limit is 1 MB, and
the total key limit is 1024.

我不确定什么时候生效,但这可能解释了各种来源之间的差异.

点赞