title: Swift code working in playground, but not in project
body: <p>I tested out some code in a playground and it works as I would expect.</p>
  
  <p>I built an extremely basic (one function, one button, one textfield) project to test the code in and it doesn't work – in fact it hangs up (beach balling).</p>
  
  <p>What might cause this to happen?
  Both the playground and the project import Cocoa and Foundation.</p>
  
  <p>The code is below.</p>
  
  <p>It appears to get hung up on this line:</p>
  
  <pre><code>let data = pipe.fileHandleForReading.readDataToEndOfFile()
  </code></pre>
  
  <p>Here's the code as it is written in the playground (and copied into the project):</p>
  
  <pre><code>import Cocoa
  import Foundation
  
  
  
  
  // *** Getting exiftool version number
  
  func exiftoolVersion() -&gt; String {
  
      let task = Process()
      let pipe = Pipe()
  
      task.standardOutput = pipe
      task.arguments = ["-ver"]
      task.executableURL = URL(fileURLWithPath: "/usr/local/bin/exiftool")
      do {
          try task.run()
          task.waitUntilExit()
      }
      catch {
  
      }
  
      let data = pipe.fileHandleForReading.readDataToEndOfFile()
      var output = String(data: data, encoding: .utf8)!
  
      output = output.filter { !$0.isWhitespace }
      return output
  }
  </code></pre>