Since the first beta of Xcode 16, randomly when editing a SwiftUI view a crash report opens with the message "PreviewShell quit unexpectedly." After that, annoyingly often the canvas fails to reload correctly, and shows this broken thing:
The only way to get it working again is to restart Xcode, but it happens so often that it really impacts productivity.
Does this happen to anyone else? If so, have you found a solution?
I've already filed a report (FB14876223)
Hi,
Sorry to hear you are having problems getting previews working consistently. You are unfortunately hitting a known issue without a great workaround.
I see you've identified that quitting xcode works. A slightly faster workaround that you can try is to run this in Terminal.app xcrun simctl --set previews shutdown all
and then reload the preview.