Group Group Group Group Group Group Group Group Group

Chapter 11 - Now it's not possible to render any SwiftUI previews

Hi.

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.
Best regards.
Gonzalo.

Hi @gonzalosuarez, thank you for bringing this issue to our attention and for providing a link with a working solution. @ganem do you have a suggestion for this issue? Thanks!

I’ll take a look. Thanks for pointing this out.

@accordionguy I believe this is in your domain? Can you verify please?

@gonzalosuarez Do you still have issues with this?