NSUserDefaults doesn't seem to work for me in iOS8. When I run a simple code it crashes with this error pointing to the line with the setDouble
call:
Thread 1: EXC_BAD_ACCESS(code=1, address=0xffffffffc)
the 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?