12

我的应用程序使用aplist作为数据存储,我想知道,iOS中plist文件的最大存储容量是多少?

4

2 回答 2

6

A plist can be of arbitrary length.

Apple, however, only recommend plists having a maximum size of a couple hundred KB:

"For situations where you need to store small amounts of persistent data—say less than a few hundred kilobytes—property lists offer a uniform and convenient means of organizing, storing, and accessing the data."

For data which is more memory intensive, they recommend the following:

"In some situations, the property-list architecture may prove insufficient. If you need a way to store large, complex graphs of objects, objects not supported by the property-list architecture, or objects whose mutability settings must be retained, use archiving."

于 2013-03-13T11:18:46.467 回答
1

plist is a file format. It is only constrained by the maximum file size. The way it's read and written poses another constraint: the memory available to hold serialized objects.

于 2013-03-13T11:18:53.683 回答