Skip to main content
Glama

Mobile Next MCP

ios.ts991 B
import assert from "assert"; import { IosManager, IosRobot } from "../src/ios"; import { PNG } from "../src/png"; describe("ios", async () => { const manager = new IosManager(); const devices = await manager.listDevices(); const hasOneDevice = devices.length === 1; const robot = new IosRobot(devices?.[0]?.deviceId || ""); it("should be able to get screenshot", async function() { hasOneDevice || this.skip(); const screenshot = await robot.getScreenshot(); // an black screenshot (screen is off) still consumes over 30KB assert.ok(screenshot.length > 128 * 1024); // must be a valid png image that matches the screen size const image = new PNG(screenshot); const pngSize = image.getDimensions(); const screenSize = await robot.getScreenSize(); // wda returns screen size as points, round up assert.equal(Math.ceil(pngSize.width / screenSize.scale), screenSize.width); assert.equal(Math.ceil(pngSize.height / screenSize.scale), screenSize.height); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EmpathySlainLovers/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server