Every time I make a change in my code, an error shows up above the preview (Cannot preview this file - unexpected error occurred), and when I click "Run Diagnostics" it displays :
messageRepliedWithError("Connecting to launched interactive agent 22385", Optional(Error Domain=com.apple.dt.ultraviolet.service Code=17 "connectToPreviewHost: Failed to connect to 22385: (null)" UserInfo={NSLocalizedDescription=connectToPreviewHost: Failed to connect to 22385: (null)}))
After a couple of minutes, the preview works, and all is fine (until I make another change, and the same error shows up).
Any help would be greatly appreciated!