iPhone's NSUserdefaults is a database or plist

2020-04-20 20:50发布

问题:

I am not able to get NSUserDefaults concepts properly. Is that a database of plist file ?

回答1:

It's a key-value store that is persisted between restarts of your application. How it's implemented has little bearing on how you use it.



回答2:

I don't know if it's different on the iPhone OS (which i don't believe) but in Mac OS X is it a plist file in your Library/Preferences folder. Pretty sure it's the same on iPhone OS/iOS