i am trying to work on nsuserdefaults but few things are confusing me in apple reference and setting guide they says
Preferences are pieces of information that you store persistently and
use to configure your app. Apps often expose preferences to users so
that they can customize the appearance and behavior of the app. Most
preferences are stored locally using the Cocoa preferences
system—known as the user defaults system. Apps can also store
preferences in a user’s iCloud account using the key-value store.The user defaults system and key-value store are both designed for
storing simple data types—strings, numbers, dates, Boolean values,
URLs, data objects, and so forth—in a property list. The use of a
property list also means you can organize your preference data using
array and dictionary types. It is also possible to store other objects
in a property list by encoding them into an NSData object first.
but what is users defaults system and further on in this guide they say users defaults database… if they are talking about database then why here they wrote use of plist?
similar question but not helping me
thanks in advance.
NSUserDefaults is a key value store for saving preferences. It works very much like an NSDictionary where you insert an object for a key, and pull it out.
Since the object needs to be saved to disk, only plist serializable objects work, unless you turn them into NSData first.
It is not the type of database you can run SQL queries on.