title: SwiftUI Preview Canvas Build Fails but Project Build does Not
body: <p>I am working on a project to add SwiftUI to a legacy app that uses Cocoapods.  When I try to run the preview canvas the build fails and the canvas cannot run.</p>
  
  <p>The cause is an issue building one of the included pods in the project (we’ll call this pod ‘LibraryX’).  When XCode tries to build LibraryX it encounters a segmentation fault.  But when I build the project itself there is no problem building LibraryX and starting the app.</p>
  
  <p>I have tried looking for SwiftUI-preview-specific build settings in the XCode project build settings and have not been able to find anything.  I have double checked the build path settings (as in <a href="https://stackoverflow.com/questions/57629916/swiftui-canvas-wont-build">this answer</a>) and also verified that I am building on the correct device (as in <a href="https://stackoverflow.com/questions/56505356/cannot-preview-in-this-file-failed-to-launch-app-name">this answer</a>).  In general, Googling for others who are facing similar issues has not turned up anything like my issue so far.</p>
  
  <p>What I am wondering then is this:  Does XCode use different build settings for building the project for use in creating the preview canvas?  If so is there some way to configure how the preview canvas build works?</p>
  
  <p>Because LibraryX is proprietary and the SwiftUI view I’m trying to add is simply the default “hello world” view that XCode creates there is not much I can share in the way of code samples for this question.</p>