Running Appium on real devices with ios 8 or 8.1 you need to enable a new Setting.
Under the Settings app, there will be a “Developer” item, choose it and enable the “UI Automation” toggle.
I honestly looked for the setting a dozen times and it wasn’t there on my iPhone 5s. It appeared on my iPhone 6 as soon as I plugged it in to USB.
Not sure how to get it to appear when you don’t see it, but try rebooting everything obviously. Maybe try running XCode Instruments manually?
If you don’t enable this, instruments crashes as soon as it starts. If you try running an Automation script from XCode, it just fails with “An error occurred while trying to run the script”. You might see “WebKit Threading Violation” in your log, but ignore it, the real smoking gun is: “UIAScriptAgentSignaledException”
That’s what I explain in the top of this page. Plug your phone into a mac running Xcode, open settings app. Then open “Developer Settings” like in the screenshot. Then tab “Enable UIAutomation”
Thanks @jonahss. I didn’t get Enable UI Automation in iPadAir but the option was available on iPod touch. I have enable the UIAutomation but it looks like the attached device is not available. Is there any way to find the list of devices that are connected to mac? like adb devices for windows. While running the code I got the following error,
error: Failed to start an Appium session, err was: Error: Could not find a device to launch. You requested ‘iPod touch(8.1 Simulator)’, but the available devices were: iPad2, iPad Air, iPad Retina, iPhone 4s, iPhone 5 iPhone 6 and iPhone 6 Plus.
If you see the error it says iPod touch(8.1 Simulator), I had connected the real device to the machine though it shows it as simulator, is this the expected?
To run the test in real device, do I need to configure anything else ?
The problem you are facing is because of missing SDK for your device
add SDK of your device version will solve the issue and shows the developer option in settings