Skip to content

location_set

Simulate a GPS location on an iOS simulator by providing latitude and longitude coordinates. This is essential for testing location-aware features such as maps, geofences, weather, and region-specific content without physically moving. The simulated location persists until explicitly cleared or the simulator is rebooted.

ParameterTypeRequiredDefaultDescription
deviceIdstringYesThe UDID of the target simulator (must be booted).
latitudenumberYesThe latitude coordinate to simulate (range: -90 to 90).
longitudenumberYesThe longitude coordinate to simulate (range: -180 to 180).

“Set the simulator location to Apple Park”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"latitude": 37.3349,
"longitude": -122.0090
}

“Simulate the device being in Tokyo”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"latitude": 35.6586,
"longitude": 139.7454
}

“I need to test the app as if the user is in London”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"latitude": 51.5074,
"longitude": -0.1278
}
Location set successfully.
Device: iPhone 16 Pro (F3A1B2C3-D4E5-6789-ABCD-EF0123456789)
Latitude: 37.3349
Longitude: -122.0090