Simulate Location
simctl-locationSimulate GPS location on an iOS simulator: set fixed coordinates, use city presets, play GPX scenarios, animate waypoint routes, or clear the override.
Instructions
simctl-location
Simulate GPS location on an iOS simulator — set fixed coordinates, use city presets, play back GPX routes, animate along waypoints, or clear the override.
What it does
Wraps xcrun simctl location <udid> set/clear/start/run/list to give full control
over the simulated GPS position. Exactly one action must be specified per call.
Parameters
udid (string, optional): Simulator UDID. Defaults to the booted simulator if omitted.
Actions (exactly one required)
Action | Params | Description |
Coordinate |
| Set fixed lat/lng |
City preset |
| Named city from built-in list |
GPX scenario |
| Run a built-in scenario by name |
Waypoints |
| Animate route |
Clear |
| Remove location override |
List scenarios |
| List available GPX scenario names |
City Presets
dublin, london, newyork, sanfrancisco, tokyo, sydney, paris, berlin, beijing, mumbai, cairo, saopaulo, losangeles
Aliases also accepted: nyc (→ newyork), sf (→ sanfrancisco), la (→ losangeles)
Coordinate Validation
Latitude: -90 to 90
Longitude: -180 to 180
Waypoints Format
Whitespace-separated lat,lng pairs. At least 2 required.
"53.34,-6.26 51.50,-0.12 48.85,2.35"Returns
JSON response with action, udid, success, message, action-specific fields, and guidance.
Examples
Set coordinates
await simctlLocationTool({ lat: 53.3498, lng: -6.2603 })City preset
await simctlLocationTool({ city: 'Dublin' })
await simctlLocationTool({ city: 'nyc' })GPX scenario
await simctlLocationTool({ gpx: 'FreewayDrive' })Waypoint animation
await simctlLocationTool({ waypoints: '53.34,-6.26 51.50,-0.12', speed: 10 })Clear override
await simctlLocationTool({ clear: true })List scenarios
await simctlLocationTool({ listScenarios: true })Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpx | No | ||
| lat | No | ||
| lng | No | ||
| city | No | ||
| udid | No | ||
| clear | No | ||
| speed | No | ||
| waypoints | No | ||
| listScenarios | No |