title: How to add SwiftUI views to existing pre-SwiftUI projects
body: <p>I have an Xcode project from 2018, which compiles without any errors or warnings.
  (It used to use cocoapods, but I've recently replaced it by importing my one dependency using SPM, since then I have removed all cocoapods remnants using <code>pod deintegrate</code>).</p>
  <p>Anyway, if I add a simple</p>
  <pre><code>struct TestView: View {
      var body: some View {
          Text(&quot;Hello, World!&quot;)
      }
  }
  </code></pre>
  <p>to my project the SwiftUI preview will fail after 8s and say:</p>
  <pre><code>MessageSendFailure: Message send failure for send render message to agent
  
  ==================================
  
  |  RemoteHumanReadableError: Could not connect to agent
  |  
  |  Bootstrap timeout after 8.0s waiting for connection from 'Identity(pid: 30286, sceneIdentifier: Optional(&quot;XcodePreviews-30286-133-static&quot;))' on service com.apple.dt.uv.agent-preview-service
  </code></pre>
  <p>If I move all resources and *.swift files to a freshly created Xcode project, the SwiftUI preview will work.
  I have looked through all possible <code>Build Settings</code> I could think off, none seems to be causing this.</p>
  <p>PS: Of course, I have deleted the <code>DerivedData</code> folder many times, since that is often the first thing we try.</p>