Hi, I'm trying to save the state of some switches and restore it when the app launches again but when I wrote this :
override func encodeRestorableState(with coder: NSCoder) {
super.encodeRestorableState(with: coder)
coder.encode(Int32(self.runSwitch1.state.rawValue), forKey: CodingKey.Protocol)
}
I got this error : Cannot convert value of type 'CodingKey.Protocol.Type' to expected argument type 'String'
What should I do ?