Previews won't show in Xcode 14

I have this problem where sometimes previews just stop working in a project. It happened to me once in Xcode 13, and it happened for my now in Xcode 14.

How do you get the preview pane to show again? The only way I was able to fix it before was recreating the entire project.

  • Does the file have a PreviewProvider defined and an import SwiftUI?

Add a Comment

Replies

Yes, they do! If I create a new SwiftUI project, and copy the same files over it works.

  • sounds like the old project might have a build setting causing issues. We can help debug if you attach it to a new feedback.

Add a Comment