Hello
I have a problem that I can’t solve and can’t find solution for few hours.
After adding:
required init?(coder aDecoder: NSCoder) {
items = ChecklistItem
super.init(coder: aDecoder)
loadChecklistItems()
}
and this :
func loadChecklistItems() {
let path = dataFilePath()
if let data = try? Data(contentsOf: path) {
let unarchiver = NSKeyedUnarchiver(forReadingWith: data)
items = unarchiver.decodeObject(forKey: “ChecklistItems”) as! [ChecklistItem]
unarchiver.finishDecoding()
}
}
I have an error and also in loadChecklistItems()
Before that all works great.
As I’m new user I cant upload my project but syntax same as in tutorials, I checked it by FileMerge.