title: Jenkins-ios: how to launch the iphone simulator from Jenkins
body: <p>I'm using the <code>Jenkins CI</code> as build management tool on the build server and I am running my unit test cases using the below command through <code>Jenkins</code>.</p>
  
  <pre><code>export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
  xcodebuild -sdk iphonesimulator -project MyStore2.xcodeproj -scheme MyStore2 -configuration Debug RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES ONLY_ACTIVE_ARCH=NO clean test 2&gt;&amp;1 | /usr/local/bin/ocunit2junit 
  </code></pre>
  
  <p>The iPhone simulator is not launched from the <code>Jenkins UI</code>, whereas if I use the same command in command prompt, it is working fine.</p>
  
  <p>The build console output is as below:</p>
  
  <pre><code>/Users/Shared/Jenkins/Home/workspace/iOSUnitTestCaseSample/MyStore2/Images.xcassets
  2014-08-12 03:11:38.979 IBCocoaTouchImageCatalogTool[92947:303] CFPreferences: user home directory at file:///Users/Shared/Jenkins/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.
  /* com.apple.actool.compilation-results */
  /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyStore2-cfjvjlzuxlhdpddpszyhlozlqjdw/Build/Products/Debug-iphonesimulator/MyStore2.app/LaunchImage-700-568h@2x.png
  /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyStore2-cfjvjlzuxlhdpddpszyhlozlqjdw/Build/Products/Debug-iphonesimulator/MyStore2.app/Assets.car
  /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyStore2-cfjvjlzuxlhdpddpszyhlozlqjdw/Build/Intermediates/MyStore2.build/Debug-iphonesimulator/MyStore2.build/assetcatalog_generated_info.plist
  
  .
  .
  .
  
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyStore2-cfjvjlzuxlhdpddpszyhlozlqjdw/Build/Products/Debug-iphonesimulator/MyStore2Tests.xctest/MyStore2Tests -o /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyStore2-cfjvjlzuxlhdpddpszyhlozlqjdw/Build/Products/Debug-iphonesimulator/MyStore2Tests.xctest.dSYM
  </code></pre>
  
  <p>Please guide me on how to resolve this issue. Help Appreciated.</p>
  
  <p>Thanks.</p>