GUIDE

How to set a custom location in the iOS Simulator

Test a location-aware website from anywhere by setting the iOS Simulator’s location, from the Simulator menu or the command line.

Updated October 2, 2026

The iOS Simulator doesn’t use your Mac’s real location. It reports whatever location you give it, which is exactly what you want when testing store finders, maps, delivery areas, or region-specific content.

From the Simulator menu

In the Simulator app, choose Features → Location → Custom Location… and enter a latitude and longitude. The same menu has a few built-in options, such as Apple’s headquarters and moving routes like City Run and Freeway Drive.

From the command line

Set a fixed location on the running simulator (latitude first, then longitude, with a . decimal separator):

xcrun simctl location booted set 41.3851,2.1734

Simulate movement between two or more waypoints, at a speed in meters per second:

xcrun simctl location booted start --speed=15 41.3851,2.1734 41.4036,2.1744

Clear the simulated location when you’re done:

xcrun simctl location booted clear

xcrun simctl location booted list shows the built-in scenarios, which you can play with run.

Make sure the page sees it

  • The page has to ask. A website reads location through the Geolocation API, and Safari asks for permission the first time. After you change the location, the page only sees it the next time it calls getCurrentPosition. If it uses watchPosition, it gets the update automatically.
  • Use a secure origin. Geolocation only works on HTTPS or localhost. A plain http:// LAN address can’t request location at all.
  • Location access turned off for Safari? Reset Safari’s location access in the simulator so it asks again, then reload the page:
xcrun simctl privacy booted reset location com.apple.mobilesafari

If you denied one website, check Safari’s settings for that site in the simulator.

With Device Helm

Open the Location section, search for a place or drop a pin on the map, and click Set Location. Device Helm applies it to the selected simulator, and keeps the places you use in Recents so you can save them as Favorites. When you start a workspace, your chosen location is applied before the page opens. Device Helm sets a fixed location. To simulate movement, use simctl location start as shown above.