Closed mjurfest closed 7 years ago
In the decode method (required init(coder aDecoder: NSCoder)) of the user model, the following line should be: self.id = aDecoder.decodeInteger(forKey: "user-id") instead of self.id = aDecoder.decodeObject(forKey: "user-id")
required init(coder aDecoder: NSCoder)
self.id = aDecoder.decodeInteger(forKey: "user-id")
self.id = aDecoder.decodeObject(forKey: "user-id")
In the decode method (
required init(coder aDecoder: NSCoder)
) of the user model, the following line should be:self.id = aDecoder.decodeInteger(forKey: "user-id")
instead ofself.id = aDecoder.decodeObject(forKey: "user-id")