After refactoring the code to meet the pattern MVVM (Chapter 11) I noticed that preview stopped working. This feature is kind of neat because it speeds up SwiftUI development and now, at this point, the only way to check how the user interface looks like is by running the simulator.
The error that is happening is described by Xcode as:
Failed to build ChecklistView.swift
Compiling failed: ‘ContentView_Previews’ is not a member type of ‘Checklist’
After a bit of searching I found: https://github.com/feedback-assistant/reports/issues/52
I tested it and seems to fix the problem but… I wonder if the authors are aware of this issue. Do they know or suggest a proper way to fix it?
Thank you much for the help.