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?