I am referring to the following textbook reference:
init() {
if let archivedItems = NSKeyedUnarchiver.unarchiveObject(withFile: itemArchiveURL.path) as? [Item] {
allItems = archivedItems
}
}
I am getting an error message in XCODE as this method is now obsolete. Can someone please assist in what new commands I need to enter in order to successfully restore the Items in this example of the book?
It seems that saving data I have managed to achieve, but retrieving the data is impossible.