NSUserDefaults doesn't seem to work for me in iOS8. When I run simple code, it crashes with this error and points to a line with setDouble :
Subject 1: EXC_BAD_ACCESS (code = 1, address = 0xffffffffc)
code:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { let defs = NSUserDefaults.standardUserDefaults() defs.setDouble(2.5, forKey: "foo") return true }
What am I doing wrong?
source share