Errata for Core Data by Tutorials v3.1

In Chapter 6 “Versioning and Migrating - sequential migration” in Core Data by Tutorial v3.1 there is a difference between the text in the PDF and the corresponding final code. In the final code the request in NotesListViewController is build like this

let request: NSFetchRequest<Note> = NSFetchRequest(entityName: "Note")

And this change is not mentioned in the PDF.
If I use the Code in version 4 of the example the code crashes.

let request = Note.fetchRequest() as! NSFetchRequest<Note>

For me it’s also not really clear why this crashes…

Can someone explain what is the difference? And could someone add this change to the corresponding chapter?

1 Like

@tetanuss. Thanks very much for your question, and my apologies for the delayed response! Are you still getting this error? If so, can you please provide the error message you’re getting, and then we can see what the problem is?

I hope to hear from you soon!

All the best!