Mobile MCP: let AI agents drive your iOS and Android apps. MCP server for simulators, emulators and real devices. Works with Claude Code, Codex, Cursor and any MCP client.
TypeScript agentandroidandroid-automationappium-alternativeclaude-codecodexcursoremulatoriosios-automationmcpmcp-servermobilemobile-automationmobile-testingreal-devicesimulatorskills
feat: double-tap on ios devices and simulators (#207)
Gil Megidishdfd8d0026f67
diff --git a/src/ios.ts b/src/ios.tsindex 8b0d318..51a1dd4 100644--- a/src/ios.ts+++ b/src/ios.ts@@ -192,8 +192,8 @@ export class IosRobot implements Robot {}public async doubleTap(x: number, y: number): Promise<void> {- // const wda = await this.wda();- // await wda.tap(x, y);+ const wda = await this.wda();+ await wda.doubleTap(x, y);}public async longPress(x: number, y: number): Promise<void> {diff --git a/src/iphone-simulator.ts b/src/iphone-simulator.tsindex 10e7d9c..8f6170a 100644--- a/src/iphone-simulator.ts+++ b/src/iphone-simulator.ts@@ -252,10 +252,8 @@ export class Simctl implements Robot {}public async doubleTap(x: number, y: number): Promise<void> {- // const wda = await this.wda();- // await wda.tap(x, y);- // await new Promise(r => setTimeout(r, 100)); // short delay- // await wda.tap(x, y);+ const wda = await this.wda();+ await wda.doubleTap(x, y);}public async longPress(x: number, y: number) {diff --git a/src/webdriver-agent.ts b/src/webdriver-agent.tsindex 4a5305c..fd96af1 100644--- a/src/webdriver-agent.ts+++ b/src/webdriver-agent.ts@@ -173,6 +173,39 @@ export class WebDriverAgent {});}+ public async doubleTap(x: number, y: number) {+ await this.withinSession(async sessionUrl => {+ const url = `${sessionUrl}/actions`;+ await fetch(url, {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify({+ actions: [+ {+ type: "pointer",+ id: "finger1",+ parameters: { pointerType: "touch" },+ actions: [+ { type: "pointerMove", duration: 0, x, y },+ { type: "pointerDown", button: 0 },+ { type: "pause", duration: 50 },+ { type: "pointerUp", button: 0 },++ { type: "pause", duration: 100 },++ { type: "pointerDown", button: 0 },+ { type: "pause", duration: 50 },+ { type: "pointerUp", button: 0 }+ ]+ }+ ]+ }),+ });+ });+ }+public async longPress(x: number, y: number) {await this.withinSession(async sessionUrl => {const url = `${sessionUrl}/actions`;