sindresorhus / Defaults

💾 Swifty and modern UserDefaults
https://swiftpackageindex.com/sindresorhus/Defaults/documentation/defaults
MIT License
1.97k stars 117 forks source link

Color error: Type 'ColorStructTest' does not conform to protocol 'Decodable' or 'Encodable' #112

Closed GanZhiXiong closed 1 year ago

GanZhiXiong commented 1 year ago

My development environment

My code(macOS App):

struct ColorStructTest: Identifiable, Defaults.Serializable, Codable {
  var id: String
  var name: String
  var color: Color
}
sindresorhus commented 1 year ago

Duplicate of #111

sindresorhus commented 1 year ago

In the future, please try to do some debugging yourself before opening an issue.

GanZhiXiong commented 1 year ago

OK. Thank for you reply.