Unable to run Safari tests on real iOS device - Reason: 'simctl error running 'create': An error was encountered

The problem

Unable to launch Safari on a real iOS device. I am able to run tests on an iOS Simulators (iPad Air 2, iPhone 6). The problem is Appium doesnt think that there is a real device connected with name ‘iPad’ and keeps trying to launch a simulator.
Please let me know if I am missing any setting or this is an issue with Appium Desktop

##Error:
An unknown server-side error occurred while processing the command. Original error: Could not create simulator with name ‘appiumTest-8700c8d8-5251-4a79-965d-09dc0666b816’, device type id ‘iPad’ and runtime id ‘11.1’. Reason: 'simctl error running ‘create’: An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=162):
Incompatible device’Error: An unknown server-side error occurred while processing the command

Environment

  • Appium Desktop Version - 1.2.7 Appium Server: v1.7.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.2.6 exhibited the same issue. Did not try previous versions. (New to Appium automation)
  • Desktop OS: MACOS Sierra version: 10.12.6
  • Node.js version: v8.6.0
  • Mobile platform/version under test:
  • Real device - iPad Air 2, iPhone 6
  • Appium.exe
  • Have a paid Apple developer account and devices added to the account
  • Safari browser settings: Web inspector: On, JavaScript: On
  • Enable UI Automation: On in Developer Settings in iPad
  • Tools used: Appium Desktop, Cucumber, Javascript, webdriverIO(v4.9.8), IntelliJ(2017.2.1), xcode (9.1) to install SafariLauncher

Details

  • npm run cucumber - Command which launches safari browser and runs tests on the real devices. The command works for Android real devices, simulators, iOS simulators but not on iOS real devices.

4 zsh terminals used to run different commands simultaneously:
a. ios_webkit_debug_proxy -c e456981c5f6a2a8ca93861b580bf9fb7d6609894:27753 (device connected)
b. selenium-standalone start (works fine) Used to run the tests written in cucumber
c. appium (starts listening on 0.0.0.0:4723)
d. npm run cucumber (which will kick start cucumber feature tests under the tests folder

Link to Appium logs

Code To Reproduce Issue [ Good To Have ]

const webdriverio = require(‘webdriverio’);
const { defineSupportCode } = require(‘cucumber’);
const LandingPage = require(’…/pages/abc.js’);
const appiumVer = “1.7.1”;
Before(function () {
const options = {
desiredCapabilities: {
platformName: ‘iOS’,
platformVersion: ‘11.1’,
deviceName: ‘iPad’,
udId: ‘123123’,
browserName: ‘safari’,
automationName: ‘XCUITest’,
app: ‘SafariLauncher’,
safariIgnoreFraudWarning: ‘true’,
xcodeOrgId: ‘324324224’,
xcodeSigningId: ‘iPhone Developer’,
Bundle_Id: ‘com.apple.SafariLauncher’,
appiumVersion: appiumVer
},
port: 4723
};

    this.browser = webdriverio
        .remote(options)
        .init()
        .url("http://abc")
        .timeouts('script', 35000)
        .timeouts('implicit', 35000);

Changed udID to udid - solved the issue.