title: How to get SafariLauncher to launch Safari on real iPhone
body: <p>Long story short, I followed this <a href="http://appium.io/slate/en/tutorial/ios.html?java#" rel="nofollow">http://appium.io/slate/en/tutorial/ios.html?java#</a> tutorial and now I have a project. Unfortunately, I cannot find a tutorial for running appium with a web page. So far, I have edited to fit my needs, i.e. let's say it brings up google.com, which works in the emulator.</p>
  
  <p>I have installed SafariLauncher on the device. When manually clicking the app it DOES work. </p>
  
  <p>However, when I use SafariLauncher and appium as you can tell it does not work.</p>
  
  <p>Here is what the console is telling me -> </p>
  
  <pre><code>info: [debug] Attempting to run app on real device with UDID 5343fa7f9c04cb60f02cb40f1233073d23dbbbc7
  info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5343fa7f9c04cb60f02cb40f1233073d23dbbbc7 /Users/wroberts/Library/Developer/Xcode/DerivedData/SafariLauncher-fvxpuhbhozeuydcsrdzjhhzlzpsu/Build/Products/Debug-iphoneos/SafariLauncher.app -e UIASCRIPT "/Users/wroberts/Library/Application Support/appium/bootstrap/bootstrap-971fed56c9389ee5.js" -e UIARESULTSPATH /tmp/appium-instruments
  info: [debug] And extra without-delay env: {}
  info: [debug] And launch timeouts (in ms): {"global":90000}
  info: [debug] [INST STDERR] 2014-11-21 15:09:18.206 instruments[19158:3c0b] Error fetching kdebug events
  info: [debug] [INSTSERVER] Instruments exited with code 253
  info: [debug] Killall instruments
  info: [debug] Instruments crashed on startup
  info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
  info: [debug] Stopping iOS log capture
  info: [debug] Running ios sim reset flow
  info: [debug] Killing the simulator process
  info: [debug] Killall iPhoneSimulator
  info: [debug] Killing any other simulator daemons
  info: [debug] On a real device; cannot clean device state
  info: [debug] Cleaning up appium session
  error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
  info: [debug] Error: Instruments crashed on startup
      at Instruments.onInstrumentsExit (/Users/wroberts/dev/differnt_svns/mobile_automation/appium/submodules/appium-instruments/lib/instruments.js:387:31)
      at null.&lt;anonymous&gt; (/Users/wroberts/dev/differnt_svns/mobile_au`enter code here`tomation/appium/submodules/appium-  instruments/lib/instruments.js:308:12)
      at ChildProcess.emit (events.js:98:17)
      at Process.ChildProcess._handle.onexit (child_process.js:809:12)
  </code></pre>
  
  <p>and here is my relevant code </p>
  
  <pre><code>DesiredCapabilities capabilities = new DesiredCapabilities();
  
      capabilities.setCapability("appium-version", "1.3.1");
  
      //capabilities.setCapability("platformVersion", "8.1");
  
      capabilities.setCapability("platformName", "iOS");
  
      capabilities.setCapability("deviceName", "Tahir's iPhone");
  
      capabilities.setCapability("udid", "5343fa7f9c04cb60f02cb40f1233073d23dbbbc7");
  
      String bundle = "/Users/wroberts/Library/Developer/Xcode/DerivedData/SafariLauncher-fvxpuhbhozeuydcsrdzjhhzlzpsu/Build/Products/Debug-iphoneos/SafariLauncher.app";
  
      capabilities.setCapability("bundleId", bundle);
  
  
      capabilities.setCapability("app", bundle);
  
  
      driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);    
  
      driver.get("http://www.google.com");
      Thread.sleep(20000);
  </code></pre>
  
  <p>So in short, can ANYONE get SafariLauncher to work on a real device?</p>