title: Run SwiftUI preview from SPM Package
body: <p>I am developing a package of Swift Package Manager where SwiftUI views need to be included.</p>
  
  <p>Every SwiftUI view should have a preview.</p>
  
  <p>However, when I try to run a preview of any view I get the following error:
  <a href="https://i.stack.imgur.com/ouo4v.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ouo4v.png" alt="enter image description here"></a></p>
  
  <p>I found a way where if I change the package scheme to the main target scheme it becomes work. But using this way I have to switch between schemes all the time and the main target needs to be built every time I want to run a preview of a package.</p>
  
  <p>Is it possible to run SwiftUI preview somehow directly from SPM Package without building the main target?</p>