NSKeyedUnarchiver.unarchiveTopLevelObjectWithData return nil
问题 I want to save an array of objects into UserDefaults and load it back. When trying to unarchive the data it always returns nil.. any idea? This is my object: class DbInsideLevel: NSObject, NSSecureCoding { static var supportsSecureCoding: Bool { return true } let idNum: Int! var topicId: Int = 0 var tryCount: Int = 0 var score: Int = 0 var isOpen: Bool = false var lastPlayedDate: Date? init(idNum: Int, topicId: Int, tryCount: Int = 0, score: Int = 0, open: Bool, lastPlayedDate: Date?) { self