Codable class does not conform to protocol Decodable
The compiler cannot synthesise the required init(from:) method due to the weak reference, so you need to write it yourself. class Bookmark: Codable { weak var publication: Publication? var indexPath: [Int] var locationInText = 0 private enum CodingKeys: String, CodingKey { case indexPath case locationInText } init(publication: Publication?, indexPath: [Int]) { self.publication = publication self.indexPath … Read more