GPSLarpXcode Simulate Location
Xcode Simulate Location greyed out or not working on a real device
Simulating a location works in the Simulator, and then you plug in a real iPhone and the option is greyed out, does nothing, or silently reports the phone's actual position instead.
Almost always the phone, not the tooling. A real iPhone has to be in a particular state before anything — Xcode included — can hand it a coordinate, and when it is not, the tools tend to report it badly or not at all. There are four conditions. Three of them you fix on the phone, for free, in a few minutes.
01What has to be true before any tool can do this
Location simulation on a physical device is not a feature of your editor. It runs over Apple's device-development services — the ones a Mac reaches across a paired connection — and the phone only offers those services when it is set up to. The tool is asking; the phone is refusing.
That is why the same four conditions explain the greyed-out menu, the option that does nothing, and the script that used to work and stopped. Check them in this order, because it is roughly the order of how often each one is the answer:
- Developer Mode is on — iOS 16 and later, off by default on every iPhone.
- The developer disk image is mounted, matching the exact iOS build on the phone.
- Nothing else is holding the connection — only one program at a time may talk to an attached iPhone.
- The phone is unlocked and trusts the computer, and it is running an iOS version your tooling still supports.
02Developer Mode is off
This is the most common answer by a distance, and it is the one that looks least like a cause, because nothing tells you about it.
Developer Mode is off by default on every iPhone. Until it is on, iOS will not let anything change the location the phone reports — no editor, no script, no application. The switch is on the phone, at Settings › Privacy & Security › Developer Mode.
Two things about it surprise people, and both are Apple's design rather than a bug in whatever you are using:
- The row is hidden until a computer has asked for it. If you look in Settings and there is no Developer Mode entry, that is expected on a phone that has never been connected to a development machine — not evidence that your iOS version lacks the feature.
- Turning it on restarts the phone. The toggle is followed by a reboot and a confirmation after the phone comes back up. If you are part-way through something, finish it first.
One more, because it wastes a lot of time: a computer cannot flip this switch for you when the phone has a passcode, which is very nearly every phone. A computer can make the row appear — that needs no passcode and restarts nothing — but the toggle itself is yours to press on the device. Tooling that claims otherwise is describing a phone without a passcode.
GPSLarp's own explanation of this switch, including what it changes on the phone, is at Developer Mode.
03The developer disk image is not mounted
The second condition, and the one most likely to be the answer if Developer Mode is already on.
iOS requires a developer disk image to be mounted before it will accept a simulated location. Without it the phone does not advertise the service that location simulation runs through — so the capability is not "disabled" so much as not being offered, which is why the error, when there is one, so rarely names it.
The image has to match the exact iOS build on the phone, not just the major version. This is the usual reason a setup that worked last month stops after a phone updates overnight: the image on the Mac is now for the wrong build.
Development tooling normally mounts this for you when it recognises the build. When it does not — a very new iOS release, or a mismatch after an update — that is the wall. See the developer disk image for what it is and what mounting it involves.
04Something else is holding the connection
The cause that produces the most confusing symptoms, because everything looks configured correctly and the feature still will not run.
Only one program at a time may hold the connection to an attached iPhone. Whichever got there first keeps it, and the others get a device that appears in a list but cannot be driven. The usual culprits are all ordinary things to have open:
- Finder, whenever an iPhone is selected in a window's sidebar — whether or not anything is syncing.
- Your editor, while a device is selected as a run destination, and while its devices window is open.
- Apple Configurator, and anything else that manages devices.
The fix is to close the other one and try again. If you are switching between an editor and a command-line tool, this is very often the entire problem, and it is worth ruling out before you change any configuration. GPSLarp's version of this page is the iPhone is in use by another program.
05iOS 17 changed the connection itself
If you have a script or a setup that worked and then stopped around iOS 17, this is probably why, and no amount of checking the first three will help.
On iOS 17 and later, reaching the developer services means holding a tunnel to the device that has to be created with administrator rights on the computer. That is a change in how the phone is reached, not a setting you toggled. Older tooling that predates it does not have the tunnel and cannot acquire one, so it fails on devices it used to drive — usually with an error about not finding the device or the service, rather than about the transport.
The practical consequence: if your tooling is older than iOS 17, update it before debugging anything else. A tool that cannot open the tunnel will keep reporting a missing device however correctly the phone is set up.
06Fixing this without buying anything
Worth saying plainly, because this is a page on a vendor's website: for three of the four causes above there is nothing to buy, and for the fourth there is a free option.
01Developer Mode and the connection
Both are free and neither needs any software beyond what you have. Developer Mode is a toggle in Settings; the held-connection problem is fixed by closing the program that is holding it. Between them these are most of the cases.
02The disk image, from your existing tooling
Your development environment mounts this itself when it has an image for the build. Updating it so that it knows about a newly-released iOS is often the whole fix, and costs nothing.
03The free command-line route
There is mature open-source tooling that speaks the same device protocols and can set a simulated location on a real device from a terminal, including on iOS 17 and later. If you are comfortable on a command line, that path is genuinely free and it is the same interface underneath. It is worth knowing about before you consider anything paid, and it is the honest answer to "is there a free way to do this".
07What this page will not guess at
Everything above is about the state your phone has to be in, which is checkable and is where this page's confidence ends.
It deliberately says nothing about which menu greys out under which condition in any particular version of Xcode, what a scheme's options are called, or where they moved in the last release. Those change between versions, this site does not track them, and a page that invents them would be wrong in the way that is hardest to notice — plausible, specific, and confidently phrased.
If the four conditions above are all satisfied and a real device still refuses, the remaining question is about your editor rather than your phone, and Apple's own developer documentation and developer forums are the right place for it.
08Where GPSLarp fits, and where it does not
GPSLarp is a desktop application that sets the GPS coordinates a paired iPhone reports. It runs on a Mac or a Windows PC and installs nothing on the phone. Two things about it are relevant to this page specifically:
- It checks these prerequisites before it asks for anything. It reads whether the phone is present, trusted, unlocked, on a supported iOS version, in Developer Mode and carrying the disk image — and it does that without needing an administrator password. When one is missing it names that one, instead of failing with an error that mentions none of them.
- It can mount the developer disk image itself, which is the half of the setup that does not need you in Settings.
It also reports "could not tell" as a distinct answer, which matters more than it sounds: a locked iPhone makes iOS refuse the question, and a tool that reports that refusal as "Developer Mode is off" sends you into Settings and a reboot for a problem you do not have.
Beyond diagnosis it is an application for choosing and moving a position: a map to pick from, street routes replayed at a walking or driving pace you set, several stops chained into one run, and an on-screen joystick for nudging the position live.
If what you want is the step-by-step version of setting a location rather than the troubleshooting, that is changing your iPhone's location from a Mac.
09What GPSLarp does not do
Listed here rather than left to be discovered, because this audience will check:
- There is no GPX import. No file picker, no open command, no way to hand it a route file and have it played. Routes are planned inside the application. The full answer covers the one narrow first-run exception and why the format turns up at all.
- It drives one device at a time. Starting a second replaces the first, so it is not a way to run a bank of test phones.
- It makes no compatibility claim about any named application, because it has not been tested against one. What it changes is the system location the phone reports.
- It claims nothing about detection. What any given application does about a simulated location is that application's policy, and this project has no visibility into it.
- It needs a computer. The interface this uses exists between a computer and a phone, so there is no on-device version — why that is the mechanism rather than a missing feature.