Search code examples
canvaspreviewswiftui

SwiftUI canvas running shows result of previous project


I practiced 'SwiftUI: Getting Started' from 'raywenderlich' and it was ok. Xcode and SwiftUI and everything worked great.

I started 2nd practice from apple's official site. (Actually what project is not important, I think.)

Middle of my 2nd practice I made some view and always when I run(?) the preview it showed 'SwiftUI: Getting Started's preview. But normal preview (not run) had no problem. I can not check my view working or not.

Is it an error of XCode 11 beta 4(11M374r) or macOS(10.15 Beta(19A512f)) or my setting problem?

should I wait till apple fix it? or do I need to change some kind of project setting?

thank you.

(I tried clean build folder, delete every derivedData folders. (all projects) relaunch xcode.)


Solution

  • This is a bug at least in Betas 3 and 4. Clean build folder and restarting Xcode have usually worked for me, but apparently not in your case.

    File feedback.