'ADB equivalent for iOS device

I was looking some instrument like Android ADB in order to debug iOS devices. I've found iOS instrument, a tool of the XCode that is able to debug app on mobile iOS devices. This instrument is helpful if you have to test your application or some other open source app.

I need to test the iOS device, more than my apps, so I was looking for something like Android ADB for iOS devices.

Is there something like it?



Solution 1:[1]

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 simulators and 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 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.

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

Examples from the docs:

Tap idb ui tap X Y Taps a location on the screen specified in the points coordinate system. The tap duration can be set with --duration

Swipe idb ui swipe X_START Y_START X_END Y_END Swipes from the specified start point to the end. By default this will be done by a touch down at the start point, followed by moving 10 points at a time until the end point is reached. The size of each step can be specified with --delta.

Solution 2:[2]

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

Solution 3:[3]

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.

Solution 4:[4]

If you happen to have Adobe AIR installed with their ADT (Adobe Developer Tool), you can run:

adt -devices -platform ios

Solution 5:[5]

Command for list of available iOS simulators : xcrun simctl list

Command for list of active/running iOS simulators : xcrun simctl list | grep Booted

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David
Solution 2 auspicious99
Solution 3 Rob
Solution 4 auspicious99
Solution 5 Mohammad Risha Raditya