iosswiftuixcode11macos-catalina

Cannot preview in this file - active scheme does not build this file : SwiftUI on Xcode 11 in CatalinaOS


I opened Landmark App using SwiftUI on Xcode 11 in macOS Catalina(10.15) and while opening the Canvas Editor for .swift files containing SwiftUI is showing

Cannot preview in this file - active scheme does not build this file

Try Again, Diagonistics option or restarting Xcode not solving the problem.


Solution

  • Select the Scheme that has the current file to Preview
    enter image description here