Failed to build ChecklistView.swift

Tried a few times with different versions of the checklist from the source folders and without me making any changes to the source code I keep getting this error when I try to see the preview

Screenshot 2020-02-14 at 12.42.29

How can I fix it?

Hi @kammahha, which chapter are you running the source code from?


I’ve tried running it from chapters 11-15, different chapters inside the folders too

I’m experiencing the same issue. I noticed that it occurred once we organized the project to conform to the MVVM design pattern. All was working fine prior to these changes. Any insight yet into a fix?

Thanks in advance,


@shogunkaramazov, can we let the authors know about this issue? @solosilverback and @kammahha, let’s see if we can get this relayed to the authors so a fix can be provided. Apologies for any inconveniences.


I just finished Chapter 11 on the 8.2.1 book version and everything is working perfectly fine with no errors. The only thing i had to change , because it did not update was rename the ContentView file to ChecklistView. There were no other problems and everything worked 100% as the book explained and demonstrated.

I also tested loading the Resource code given for the project files and everything is working also fine.
It’s possible you have made some other error when writing the code or there is some problem with Xcode on your end @solosilverback

Good luck ! :slight_smile:

@kammahha @solosilverback Do you still have issues with this?

I’m having the same issue, even when I use the code, provided by authors of the book.

The app itself compiles correctly, I can run it and play with it, but when I try to use canvas with ChecklistView.swift, it fails to show the preview with this message.

Googling showed, that the problem is with Checklist bundle name, and Checklist class name (since they are the same).
When I renamed Checklist class to ChecklistModel, the problem disappeared, and the preview can be displayed correctly.

@artbataev Thank you for sharing your solution - much appreciated!

This topic was automatically closed after 166 days. New replies are no longer allowed.