What is the maximum storage capacity of a plist?

前端 未结 2 747
无人及你
无人及你 2021-02-13 19:44

My application uses a plist as data storage, and I would like to know, what is the maximum storage capacity of a plist file in iOS?

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-13 20:19

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

提交回复
热议问题