Top "Nsuserdefaults" questions

NSUserDefaults is the Objective-C API for storing and retrieving user preferences in Apple's Foundation framework for Cocoa and Cocoa Touch.

Storing authentication tokens on iOS - NSUserDefaults vs Keychain?

Which is the place I should be storing tokens for when the user logins in to a service? I'm not …

ios objective-c api nsuserdefaults keychain
How to convert int to nsindexpath?

I am making a basic quiz application.The choices are in the form of a table view. If the user …

ios swift nsuserdefaults nsindexpath
Do NSUserDefaults persist through an Update to an app in the Appstore?

Is this the case? Do NSUserDefaults get reset when you submit an update to an app on the App Store, …

iphone crash nsuserdefaults
load/save settings in iOS

I have the following two procedures defined in my AppDelegate. saveSettings and loadSettings. I am calling my loadSettings procedure in …

ios settings nsuserdefaults
How to register user defaults using NSUserDefaults without overwriting existing values?

I have an AppDelegate class with +(void)initialize method that I use to register some defaults. Here's the code that …

cocoa nsuserdefaults user-preferences
Saving UIColor to and loading from NSUserDefaults

What's the easiest way to save a UIColor into NSUserDefaults and then get it back out?

objective-c cocoa-touch nsuserdefaults uicolor
How to auto clear NSUserDefault values in swift?

How can I auto clear the nsuserdefault values in swift? I have already tried this but it doesn't work for …

swift swift2 nsuserdefaults
Swift NSUserDefaults not saving Dictionary?

I have the following test code: func testSaveDictionary() { let userDefaults = NSUserDefaults.standardUserDefaults() var jo = [ "a" : "1.0", "b" : "2.0" ] let akey = "aKey" userDefaults.…

dictionary swift nsuserdefaults
Expected Declaration Error using Swift

I'm trying to pass the boolean value of a UISwitch to another class using NSUserDefaults. For some reason, in the …

xcode swift nsuserdefaults
Swift NSUserDefaults setString:forKey:?

NSUserDefaults has integerForKey:, setInteger:forKey: and stringForKey:, but does not have setString:forKey:. How do you set a string to …

ios swift nsuserdefaults