ADB equivalent for iOS device ADB equivalent for iOS device ios ios

ADB equivalent for iOS device


To get the list of attached iOS devices, use the commandxcrun instruments -s devices.


You asked:

I would like to know if it's possible execute a touch on the iOS device, such as input events like "tap", "swipe", "drag", "flick" in similar manner of adb shell for android devices. For example, I would like to execute a touch on any icon (such as settings, or some other icon of the main menu) and I am not interesting to debug my apps, but only to emulate an event in order to debug the device.

This sort of testing is done via Instruments. See the Automated UI Testing section of the Instruments User Guide. Also see WWDC 2010 video Automating User Interface Testing with Instruments, which shows some interactive demonstrations of this process. This Cocoa Controls page has many other links, too.

Bottom line, you can use the UI Automation tool in Instruments to automate the testing of your UI. Note, some of us have had issues in iOS 7 with using this on the simulator, but it seems to work fine on physical devices.


As of 2021, there is a tool from facebook that does this sort device automation.

The project is called "iOS Development Bridge" or idb.

idb is a flexible command line interface for automating iOS simulatorsand devices

For a bit of history, it is a replacement from similar archive project called WebDriverAgent.

From the original question:

I would like to know if it's possible execute a touch on the iOSdevice, such as input events like "tap", "swipe", "drag", "flick" insimilar manner of adb shell for android devices. For example, I wouldlike to execute a touch on any icon (such as settings, or some othericon of the main menu) and I am not interesting to debug my apps, butonly to emulate an event in order to debug the device.

idb can do exactly this. It allows to interact with the device.

Examples from the docs:

Tapidb ui tap X YTaps a location on the screen specified in thepoints coordinate system. The tap duration can be set with --duration

Swipeidb ui swipe X_START Y_START X_END Y_ENDSwipes from thespecified start point to the end. By default this will be done by atouch down at the start point, followed by moving 10 points at a timeuntil the end point is reached. The size of each step can be specifiedwith --delta.