Hello! I'm developing a small app for the Apple Watch and I'm using UserDefaults as a way to pass data between Interface controllers.
I ran into SIGABRT when running this code:
and this is the code that created and saved it:
I ran into SIGABRT when running this code:
Code Block language var test: [Int] = defaults.object(forKey: "Number") as! [Int]
and this is the code that created and saved it:
Code Block language var oneTimeArray = Array(repeating: 0, count: 50) let defaults = UserDefaults.standard defaults.set([oneTimeArray], forKey: "Number")