trying to save data from my app with swiftyUserDefults but somthings not working, i am saving an array of a custom type and its saving the type but not the fields in the type here is the code:
What am i doing wrong??
final class Reminder: NSObject, NSCoding, DefaultsSerializable {
func encode(with aCoder: NSCoder) {
}
init?(coder aDecoder: NSCoder) {
}
//MARK: Content
var title: String?
var details: String?
//MARK: Alerts
var date: Date?
var location: CLLocationCoordinate2D?
var locationTitle: String?
var isArriving: Bool?
var isRepeating: Bool?
//MARK: Other
var priority: Int?
var creationDate: Date?
init(creationDate: Date?) {
self.creationDate = creationDate
}
}
extension DefaultsKeys {
static let AllReminders = DefaultsKey<[Reminder]>("AllReminders", defaultValue: [])
}
trying to save data from my app with swiftyUserDefults but somthings not working, i am saving an array of a custom type and its saving the type but not the fields in the type here is the code:
What am i doing wrong??