Maximum size of objects that can be stored in NSUserDefaults

前端 未结 2 1680
忘了有多久
忘了有多久 2021-02-07 16:22

Can anyone please tell me the maximum size of NSUserDefaults. Means objects or primitives we can store in userdefaults. for example 10 MB etc.

Thanks

相关标签:
2条回答
  • 2021-02-07 17:08

    I don't know the exact value, but NSUserDefaults are meant to store a small amount of data, I think the maximum is in the order of the kilobytes.

    If you want to store bigger property lists, then consider storing them in their own files.

    0 讨论(0)
  • 2021-02-07 17:18

    No, there is no size limit to NSUserDefaults, aside from the storage capacity of the device itself.

    see NSUserDefaults storage size capacity

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