title: Command line xcode project running throwing error FBSOpenApplicationErrorDomain error 4
body: <p>I'm writing a shell script which help me run automatically my xcode ios project and launch its build on simulator. As per now i can able to build my xcode project, launch simulator and auto install app on simulator. But failed to launch app on simulator, app crash after launching simulator and throwing an error,</p>
  
  <pre><code>    Build Begin
      Build settings from command line:
      CONFIGURATION_BUILD_DIR = /Users/username
      ONLY_ACTIVE_ARCH = YES
  
      === BUILD TARGET BuddyAdmin OF PROJECT BuddyAdmin WITH CONFIGURATION Debug ===
  
      Check dependencies
  
      ** BUILD SUCCEEDED **
  
      Instruments Usage Error : No template (-t) specified
      instruments, version 6.3 (57536)
      usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
      An error was encountered processing the command (code=4):
      The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.)
      Build End
      logout
  </code></pre>
  
  <p>And my script is,</p>
  
  <pre><code>    #!/bin/bash
      echo Build Begin
      xcodebuild -project /Users/username/Work/My_Projects/BuddyProjects/BuddyAdmin/BuddyAdmin.xcodeproj -configuration Debug -target BuddyAdmin ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=/Users/username
      xcrun instruments -w "iPad 2 (8.3 Simulator)"
      xcrun simctl install booted /Users/username/Buddy\ Admin\ 3.app
      xcrun simctl launch booted prefix.com.coname.proname
      echo Build End
  </code></pre>
  
  <p>I'm not able to find out what exact error it is. Not anywhere documented. I search a lot i found unique answer which is reset simulator, clean project and clean derived data but it won't work for me. I'm looking for actual cause of error and solution.</p>