Application restarting continuously in real IPAD

My application is restarting continuously while running the script through Eclipse.
Script :

            DesiredCapabilities cap = new DesiredCapabilities();
	cap.setCapability("platformName", "iOS");
	cap.setCapability("device", "iPAD");
	cap.setCapability("deviceName", "xxx's Ipad");
	cap.setCapability("version", "8.1.2");
	File app = new   File("/Users/xxx/Documents/Softwares/");
	cap.setCapability("app", app.getAbsolutePath());
	driver = new IOSDriver(new URL(""), cap);

I have also have set the app path in the appium server. I have also checked while giving the app path in the script only and then in the appium server only.
I copied the app from the location :

Earlier I had used this location directly in the script and in the appium server but with no effect.
I mentioned the BundleId in the appium server directly.

Below are the screenshots of the appium server.

Screenshot 1 :

Screenshot 2 :

Try This:

  1. Check the Prelaunch application option
  2. Do not provide the Bundle ID.
  3. Also provide the same server address everywhere,As the snapshot provided has while the script has

Since u r passing desired caps from code so no need to check option
like AppPath / UDID / Prelaunch in Appium server. They are mend to launch app manually in device/simulator

Also I hope u must have build UICatalog application using ur own developer certificate with XCode and then trying out this for a real device …

Thanks for the reply. solved the problem after turning on the UI Automation option in the device . It is laid under Settings —> Developer —>Enable UI Automation.