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.
lldb
don't provide? These can be used to debug apps on a device, so I'm not sure whatadb
does that you aren't finding inlldb
and Xcode. – Fund