I am looking for a way to store data about a user in iOS 4 that is similar to SharedPreferences in Android. Android’s SharedPreferences basically stores key value pairs for an application and only that application can access it.
http://developer.android.com/reference/android/content/SharedPreferences.html
Does iOS 4 have something built in that can accomplish what SharedPreferences does in Android?
NSUserDefaultsis your choice.http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html
Typically you’d like to:
[NSUserDefaults standardUserDefaults])-set*:ForKey:(* being int, double, bool, dictionary, object…)-*ForKey:-synchronizewhen needed