Post

Replies

Boosts

Views

Activity

[CLOSED] How do you read an array from UserDefaults
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: language var test: [Int] = defaults.object(forKey: "Number") as! [Int] and this is the code that created and saved it: language var oneTimeArray = Array(repeating: 0, count: 50) let defaults = UserDefaults.standard defaults.set([oneTimeArray], forKey: "Number")
1
0
585
Apr ’21