Xcode Creates Multiple SwiftUI Preview Instances and Leaves Them After Quits.

I have an app with some SwiftUI Views. When using preview in Xcode, Xcode creates many instances of the previews. Then I quit Xcode, but the previews are not quit. I have to force quit them in Menu -> Apple Icon Menu -> Force Quit.

Has anyone seen the same thing? How to solving it?

Xcode 14.3 (14E222b) macOS Ventura 13.3.1 (a) (22E772610a) Mac mini M1 16G 512G

Replies

I'm getting this on one of my apps. It seems to be spawning the whole app every time I edit a preview, leaving me with dozens of instances that have to be quit manually.

Hi,

Sorry to hear you are having problems with previews leaving abandoned/orphaned processes around. You are hitting an issue we are tracking, and we hope to have a fix in a future Xcode release.