title: How to generate a framework from a SwiftPM-generated XCode project?
body: <p>I used SwiftPM to set up an XCode project for a framework; based on</p>
  
  <pre><code>// swift-tools-version:4.0
  
  import PackageDescription
  
  let package = Package(
      name: "MyThing",
      products: [
          .library(
              name: "MyThing",
              targets: ["MyThing"]),
      ],
      dependencies: [
      ],
      targets: [
          .target(
              name: "MyThing",
              dependencies: [])
  )
  </code></pre>
  
  <p>I ran <code>swift package generate-xcodeproj</code> and then <code>pod install</code> (based on a Podfile whose content shouldn't matter). I obtain <code>MyThing.xcworkspace</code>.</p>
  
  <p>Now I figured that </p>
  
  <pre><code>xcodebuild -workspace MyThing.xcworkspace -scheme MyThing clean build
  </code></pre>
  
  <p>should create the <code>.framework</code> -- but it doesn't, only a binary file appears. I suspect some automatism is at work here since the source folder contains a file named <code>main.swift</code>, among others.</p>
  
  <p>What do I have to do to get the framework built?<br>
  I need to script the whole process, to please no manual workarounds.</p>