title: xctool: Tried to install the test host app but failed
body: <p>Trying to get app/logic tests to run through the command line. Right now I am testing out xctool.
  It works great on my dev machine, but for some reason starts failing on the Mac mini we are using as a build server.</p>
  <p>As it turns out, it <strong>works</strong> if I run it through <strong>VNC</strong> in the terminal.</p>
  <p>Update: It now works if ssh'ed.</p>
  <p>Now fails only with Jenkins.</p>
  <pre><code>./xctool.sh -project ~/Downloads/proj/Project.xcodeproj/ -scheme Project -sdk iphonesimulator7.1 clean test
  </code></pre>
  <p>And seeing this output:</p>
  <blockquote>
  <pre><code> [Info] Collecting info for testables... (3822 ms)
    run-test Tests.octest (iphonesimulator7.1, application-test)
      [Warning] Tried to install the test host app 'xxx' but failed. (31 ms)
      [Info] Preparing test environment failed; will retry 2 more times (0 ms)
      [Info] Stopped any existing iOS simulator jobs to get a fresh simulator. (3 ms)
      [Info] Reset iOS simulator content and settings. (0 ms)
      [Warning] Tried to install the test host app 'xxx' but failed. (27 ms)
      [Info] Preparing test environment failed; will retry 1 more time (0 ms)
      [Info] Stopped any existing iOS simulator jobs to get a fresh simulator. (2 ms)
      [Info] Reset iOS simulator content and settings. (0 ms)
      [Warning] Tried to install the test host app 'xxx' but failed. (24 ms)
      [Warning] Preparing test environment failed. (0 ms)
  </code></pre>
  </blockquote>
  <p>Tests fail with:</p>
  <blockquote>
  <pre><code>Test did not run: Failed to install the test host app 'xxx': Failed for unknown reason.
  </code></pre>
  </blockquote>
  <p>Whereas on my dev machine, I see the iOS simulator pop up, on the mac mini I don't see anything.</p>
  <p>What is the issue here?</p>
  <p>If I try to run on 7.0:</p>
  <pre><code>./xctool.sh -project ~/Downloads/proj/Project.xcodeproj/ -scheme Project -sdk iphonesimulator7.0 clean test
  </code></pre>
  <p>I see:</p>
  <blockquote>
  <pre><code>Check dependencies
  No architectures to compile for (ARCHS=i386 x86_64, VALID_ARCHS=armv6).
  </code></pre>
  </blockquote>
  <p>On 6.1, I receive a bunch of compiler errors.</p>
  <p>Looking at the mini's system.log I am seeing some unusual messages that yield little on search:</p>
  <blockquote>
  <p>launchd_sim_trampoline[69113]: Bogus bootstrap.plist specified.</p>
  <p>com.apple.launchd.peruser.260[80978] (com.apple.iphonesimulator.launchd.5772e154[69113]): Exited with code: 78</p>
  <p>com.apple.launchd.peruser.260[80978] (com.apple.iphonesimulator.launchd.5772e154): Throttling respawn: Will start in 10 seconds</p>
  </blockquote>
  <p>We are observing similar results as listed here: <a href="https://github.com/facebook/xctool/issues/45" rel="nofollow noreferrer">xctool issue</a></p>
  <p>Unfortunately, one of the solutions listed we have already tried, that of adding a SessionCreate key pair value to org.jenkins-ci.plist, and moving that plist to our user's ~/Library/LaunchAgents folder.</p>
  <p>This link also is similar to what we are encountering: <a href="https://github.com/facebook/xctool/issues/162" rel="nofollow noreferrer" title="xctool issue 2">xctool issue 2</a>
  Unfortunately we aren't using tmux, so the solution does not apply.</p>