iosScript Development

How to Write an iOS No-Jailbreak Script: Get One Tap Through First

The script calls startEnv to bring automation up, then clickPoint to tap one coordinate. If the service fails to start, or an old tunnel is still up on iOS 17, the tap never goes out.

2 min readUpdated

This script proves one thing: the automation service can come up, and it can send one tap to the screen. The function table, the three hardware paths, and multi-device dispatch all wait.

When the control center runs a script, check status per device

The block below can go straight into a project and run. Replace 200, 400 with the pixels you measured on the mirror or the screenshot.

function main() {
    if (!isServiceOk()) {
        let started = startEnv();
        logd("startEnv: " + started);
    }
    if (!isServiceOk()) {
        logw("service not ready, stop");
        return;
    }
    clickPoint(200, 400);
    logd("clicked 200,400");
}

main();

startEnv returns true or false. If the log has no “clicked”, the tap never went out.

Two mistakes that stop it

The first: startEnv() returns false, or isServiceOk() is still false after the call. The return above happens before clickPoint. Check the data cable, whether the phone trusts the computer, and whether this device is online in the control center, then run it again.

The second shows up on iOS 17 and later. The docs state that on this system startEnv can try to turn automation on, and it cannot close a previous tunnel on its own. After the service has dropped once, calling only startEnv can leave the status wrong. Call startTunnel() first, then startEnv(). startTunnel is available from EC iOS USB 9.22.0. An empty string means success. Any other string goes into the log, and you stop. Leave the tap unsent.

let tunnel = startTunnel();
if (!(tunnel == null || tunnel === "")) {
    logw("tunnel failed: " + tunnel);
    return;
}
if (!startEnv() || !isServiceOk()) {
    logw("service still not ready after closing the tunnel");
    return;
}
clickPoint(200, 400);

From EC iOS USB 10.7.0 (2026-09-08) you can use USB HID, with no Bluetooth or OTG board, on iOS 17 or later. That path is mutually exclusive with Start Automation in the control center and with startEnv in the script. This file uses Start Automation. If the phone has already called usbHidEvent.sessionStart, leave this file unrun. USB HID taps use usbHidEvent.clickPoint, and setScreenSize comes first.

The piece counts as done when the log contains “clicked” and the UI near that coordinate on the phone has changed. Next time, add one action only, and print its own log line on failure.


About EasyClick: A mobile automation script development platform covering three phone ecosystems: Android without root, iOS without jailbreak, and HarmonyOS. It also offers Apple script writing, Apple cluster control, Android cluster control, remote cloud control, and AI phone cluster control. → Explore all products

Ready to build it for real?

Every approach in this article can be built with EasyClick capabilities on iEasyClick — full documentation, developer tools and automation products, free to try.

Visit iEasyClick →