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?
Android ADB on iOS. It works as the ADB host role on iOS through which one can connect to android devices. NOTE that this is not the ADB daemon program that is running inside the android device.
Requires iOS 12.2 or later.
Before using Scrcpy. app, you need to setup a ssh server which with android-platform-tools installed. This ssh server will bridge all traffics from your iPhone to your Android devices, so you need to make sure you can connect to this ssh server from your iPhone over the network.
Now having said all of that, let's jump in. 1. To run ADB commands on Android without a computer, you need to install the LADB app ($2.99) from the Play Store. It is a paid app but absolutely worth it.
To get the list of attached iOS devices, use the command xcrun instruments -s 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 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With