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.

Best Practice for NSUserDefaults synchronize

I'm using [[NSUserDefaults standardUserDefaults] synchronize] each time I write anything to the plist. Is that overkill? Or are there adverse …

iphone xcode nsuserdefaults
How to receive NSUserDefaultsDidChangeNotification iphone

After a lot of searching I was not able to find wheather you need to pass a dictionary object to: […

iphone nsuserdefaults
How can I save and then load a JSON in NSUserDefaults with SwiftyJSON?

in my iOS project I need to save an entire JSON as user data and then reload it on next …

ios json swift nsuserdefaults swifty-json
NSUserDefaultsDidChangeNotification: What's the name Of the Key, that Changed?

This code will call the method "defaultsChanged", when some value in UserDefaults changed NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addObserver:self …

objective-c ios xcode nsuserdefaults nsnotificationcenter
iOS NSUserDefaults Watching the change of values for a single key

I have the following code aiming to catch the event of a NSUserDefaults value changing for a particular key. [[NSUserDefaults …

ios nsuserdefaults
NSUserDefaults errors in logs

I get some error messages in logs [User Defaults] Failed to write value for key GameId in CFPrefsPlistSource<0x1740…

ios objective-c xcode nsuserdefaults
NSUserDefaults losing its keys & values when phone is rebooted but not unlocked

We are currently experiencing the following weird issue with our iPhone app. As the title says, NSUserDefaults is losing our …

ios background nsuserdefaults core-location reboot
Save struct in class to NSUserDefaults using Swift

I have a class and inside the class is a (swift) array, based on a global struct. I want to …

ios uiimageview swift nsuserdefaults nscoding
NSUserDefaults or keychain is better to save username and password in iPhone app

In my iphone app there is some confidential data like username, password and some urls to a webservice. Which one …

iphone nsuserdefaults keychain
How to set NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints?

I am getting the following message from Cocoa Auto Layout mechanism: Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[…

cocoa nsuserdefaults autolayout