Unable to launch safari mobile browser in simulator using AppiumDriver

I got the following error logs:

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Couldn’t find built in app MobileSafari in its home or temp dir!) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4.81 seconds
Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 03:03:16’
System info: host: ‘Sanojs-Mac-mini.local’, ip: ‘172.16.2.243’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11’, java.version: ‘1.8.0_60’
Driver info: com.mob.safari.SafariLaunch$1

Following are the code:

package com.mob.safari;

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;

public class SafariLaunch {
AppiumDriver driver;

@Test
public void Launch() {
	driver.get("http://google.com");
}

@BeforeTest
public void beforeTest() throws MalformedURLException {
	DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability("platformName", "iOS");
	capabilities.setCapability("deviceName", "iPhone 6");
	capabilities.setCapability(CapabilityType.VERSION, "9.0");
	capabilities.setCapability(CapabilityType.BROWSER_NAME, "safari");
	URL url = new URL("http", "0.0.0.0", 4723, "/wd/hub");
	driver = new AppiumDriver<WebElement>(url, capabilities) {

		@Override
		public MobileElement scrollToExact(String arg0) {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public MobileElement scrollTo(String arg0) {
			// TODO Auto-generated method stub
			return null;
		}
	};
}

@AfterTest
public void afterTest() {

}

}

But the MobileSafari.app is showing in following location:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications

System Spec:
Xcode: 7.0
Mac OS: 10.11
Appium: 1.4.16

Please help me to resolve this issue.

Hi,

I got the same error.

Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Instruments crashed on startup) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 19.69 seconds
Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 02:56:46’
System info: host: ‘Anands-iMac’, ip: ‘10.1.1.6’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.8.0_60’
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:141)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:160)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:168)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:56)
at Hey.main(Hey.java:26)