How do I save a custom dictionary in UserDefault, I try through PropertyListEncoder, but I have an error.
struct pointDict {
let id: Int
let name: String
let type: Int8
}
var pointsPlane: [pointDict] = []
...
UserDefaults.standard.set(try? PropertyListEncoder().encode(pointsPlane), forKey:"pointsPlane")
Class 'PropertyListEncoder' requires that 'ViewControllerPlane.pointDict' conform to 'Encodable'