Maximum size of objects that can be stored in NSUserDefaults

前端 未结 2 1679
忘了有多久
忘了有多久 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.

提交回复
热议问题