Is there any limit in storing values in NSUserDefaults?

Johnykutty picture Johnykutty · Sep 22, 2011 · Viewed 32.4k times · Source

I am new to iPhone development and objective C. I have used NSUserDefaults to store some values in my app. But I don't know that if there is any limit for storing values in NSUserDefaults. Can anyone help me to know that.

Thanks in advance.

Answer

user914372 picture user914372 · Sep 22, 2011

As long as there's enough space on the iPhone/iPad, you can store NSUserDefault values. All those values is stored into a .plist file, and this file is very small, most of the time under 1 kb (unless you store a lot of data).