UNPKG

appium-ios-simulator

Version:
20 lines (17 loc) 571 B
import type {CoreSimulator, SupportsGeolocation} from '../types'; type CoreSimulatorWithGeolocation = CoreSimulator & SupportsGeolocation; /** * Sets the geolocation for the simulator. * * @param latitude The latitude coordinate. * @param longitude The longitude coordinate. * @returns True if the geolocation was set successfully. */ export async function setGeolocation( this: CoreSimulatorWithGeolocation, latitude: string | number, longitude: string | number, ): Promise<boolean> { await this.simctl.setLocation(latitude, longitude); return true; }