To spoof iPhone location on a Mac, connect the iPhone by USB, turn on Developer Mode, and use the location simulation Apple builds into iOS for developers. Xcode does it from the Simulate Location button while an app is running, and a GPX file lets it hit any point or follow a path. Without Xcode, you can use pymobiledevice3, a free command line tool, or an app such as GPS Phantom. None of these needs a jailbreak, and every app on the phone that uses Location Services sees the new location.
How to spoof iPhone location on Mac with Xcode, step by step
Xcode is Apple's developer app, and Simulate Location is meant for developers testing their own apps. Fake GPS on an iPhone from a Mac this way takes some setup, and the project is the slow part. The steps follow Apple's documentation.
- Install Xcode from the Mac App Store. Apple's system requirements page ties each Xcode release to a macOS version: Xcode 27, for instance, needs macOS Tahoe 26.6 or later and debugs devices on iOS 17 or later.
- Open Xcode and create a new iOS App project from the File menu. It doesn't need any code. Under Signing & Capabilities, choose your Apple Account as the team.
- Plug in your iPhone, unlock it and tap Trust when it asks about the computer.
- Turn on Developer Mode. In Settings, Privacy & Security, switch on Developer Mode under Security, tap Restart, and after the phone restarts confirm in the second alert: swipe up, tap Enable, enter your passcode. Apple says the switch appears only once you've started pairing with a Mac, and Xcode tells you when Developer Mode is off.
- Choose your iPhone as the run destination at the top of the window and press Run. The app has to be running for the simulation to work.
- In the debug area at the bottom, click the Simulate Location button and pick a city from the list.
The iPhone's location changes to that city, and Maps, Find My and Snapchat read it the same way. To stop, click the same button and choose Don't Simulate Location. Apple says the app then uses the device's own location.
Where it stops: you need Xcode installed, a project, a signing team and a live debug session. The preset list is cities, so anything else means a GPX file.
Xcode simulate location on iPhone: scheme settings
Instead of the debug area, you can set a location in the project's scheme. Choose Edit Scheme from the scheme menu in the toolbar, select the Run action, open Options, and make sure Allow Location Simulation is on under Core Location. Then use Default Location to pick None, a city and country, or Add GPX File to Project, select your file and click Add.
Apple also documents a separate Simulated Location setting in a test plan, for unit tests. It only changes the location for code running in the test bundle, which isn't what you want when the goal is the whole phone.
GPX file for Xcode: a short working example
GPX is a plain XML format for GPS points. Xcode reads it so you can place the phone at any coordinate or step it through a series of points. Apple's documentation says the file may contain waypoints marked with the wpt tag. The route (rte) and track (trk) tags aren't supported, and that's the usual reason a downloaded file does nothing.
Here's a short Xcode GPX file example that moves a phone across Paris, from the Eiffel Tower to the Louvre:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="example" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="48.8584" lon="2.2945">
<name>Eiffel Tower</name>
<time>2026-11-17T10:00:00Z</time>
</wpt>
<wpt lat="48.8606" lon="2.3376">
<name>Louvre</name>
<time>2026-11-17T10:20:00Z</time>
</wpt>
</gpx>Save it with a .gpx extension. Each wpt has a latitude, a longitude and a name; the time element is how the GPX format says when a point was reached. Apple's test documentation says Xcode replays a recorded journey by updating the simulated location, elevation and velocity, but it doesn't spell out how waypoints are spaced, so run a short file first and watch what the phone does.
To use it, click Simulate Location while the app is running, choose Add GPX File to Project, pick the file, and it appears in the same list as the cities. A GPX file made by a running or hiking app often contains a track, not waypoints, so you may need to convert it.
Xcode simulate location not working: what to check
If you've followed the steps and the iPhone doesn't move:
- Developer Mode is off, or the phone didn't finish restarting. Check Settings, Privacy & Security.
- The app isn't running from Xcode. The Simulate Location button belongs to a debug session, so it won't do anything if you stopped the app.
- Allow Location Simulation is off in the scheme's Run options.
- Your GPX file uses
rteortrkinstead ofwpt. - The GPX file isn't listed. A thread on Apple's developer forums reports that a file may not appear until its target membership is set in Xcode.
- The app you're testing with isn't the one that's checking. Simulate Location changes the system location, so open Maps or Find My to look.
Simulate location on iPhone without Xcode: pymobiledevice3 on Mac
pymobiledevice3 is an open source Python tool that reaches the same developer services Xcode uses, with no Xcode and no project. On a Mac there are no platform prerequisites; Windows and Linux users have to install iTunes or usbmuxd first, but a Mac already has what's needed. Its project page is on GitHub.
Install it with uv, the package manager the project recommends. Get uv from its documentation, then:
uv tool install --managed-python pymobiledevice3The project's docs say that on iOS 17.4 and later its commands set up the connection themselves with no root or admin rights, on macOS as on Windows. Plug in the iPhone, trust the Mac and turn on Developer Mode. Then:
pymobiledevice3 developer dvt simulate-location set -- 48.8584 2.2945
pymobiledevice3 developer dvt simulate-location play route.gpx
pymobiledevice3 developer dvt simulate-location clearThe first line sets a point; the double dash lets you pass negative coordinates. The second plays a GPX file and the third releases the location. If Developer Mode isn't showing, pymobiledevice3 amfi reveal-developer-mode makes the switch appear in Settings. If a command fails with InvalidServiceError, the project's troubleshooting guide says to check Developer Mode and run pymobiledevice3 mounter auto-mount, which fetches the right developer disk image for your iOS version.
Where it stops: no map and no search. Every move starts with looking up coordinates, and every route needs a GPX file from somewhere. The Windows guide covers the same tool on a PC.
iPhone location changer Mac options compared
Whether you call it a location spoofer for Mac or a macOS iPhone location changer, the choices come down to this:
| Option | Map and search | Routes | Setup | Where it stops |
|---|---|---|---|---|
| Xcode | Preset cities | wpt GPX files | Xcode, a project, a signing team | Needs a running debug session |
| pymobiledevice3 | No, coordinates by hand | play a GPX file | uv, command line | You supply coordinates and files |
| GPS Phantom | Yes | Stops, speed, walking, cycling, driving | None beyond Developer Mode | iOS 17.4 or later |
| VPN | No | No | None | Changes the IP address, not the GPS location |
The full comparison of every method includes jailbreak tweaks and GPS accessories, which also exist but aren't a good fit for most people.
What apps can see
Core Location has told apps when a location is simulated since iOS 15, so an app that checks can tell, whether you used Xcode, pymobiledevice3 or an app. Most apps don't look; a few games do. Can location spoofing be detected? covers it app by app.
Spoof iPhone location on Mac without the setup: GPS Phantom
GPS Phantom is a Mac and Windows app that changes the location an iPhone reports, over USB. It uses the same Apple developer simulation as Xcode, so there's no project and no signing team. The first time you connect, it fetches the developer disk image the iPhone needs, so you don't need Xcode, and it walks you through Developer Mode. It needs iOS 17.4 or later.
Search an address, a place or a category like coffee or gas station, or paste coordinates, and you see the point on the map before anything changes on the phone. For movement, add stops on the routes planner, pick walking, cycling or driving, set the speed and play it back; it pulls away from stops, brakes and slows for corners, and shows the distance and time before it starts. Deactivate releases the simulated location, and Reset to real location puts the iPhone back where it is. One account works on Mac and Windows. See features or go to the download.
Frequently asked questions
How do I spoof my iPhone location on a Mac?
To fake an iPhone location on a Mac, plug the iPhone into the Mac, turn on Developer Mode, and use Xcode's Simulate Location button while an app is running, or use pymobiledevice3 or an app like GPS Phantom. All three use the location simulation Apple built into iOS for developers, so none needs a jailbreak.
Can I change my iPhone location from a MacBook without Xcode?
Yes. pymobiledevice3 is a free command line tool that sets a point with simulate-location set and plays routes from GPX files. GPS Phantom is a Mac app with a map and search. Both reach the same developer services Xcode uses and fetch the developer disk image themselves, so a full Xcode install isn't needed.
How do I use a GPX file in Xcode to simulate location?
While your app is running, click the Simulate Location button in the debug area, choose Add GPX File to Project, and select the file. Or open Edit Scheme, Run, Options, and choose Add GPX File to Project under Default Location. The file must use wpt waypoints; Apple says rte and trk tags aren't supported.
Why does Xcode's Simulate Location not work on my iPhone?
Usually Developer Mode is off, the app isn't running from Xcode, Allow Location Simulation is off in the scheme, or the GPX file uses route or track tags instead of waypoints. Apple's developer forums also report that a GPX file may stay missing from the list until its target membership is set. Check Maps, since it reads the system location.
Can I simulate a moving route in Xcode?
Yes, with a GPX file that has several wpt waypoints. Apple's test documentation says Xcode replays a recorded journey by updating the simulated location, elevation and velocity. It doesn't say how waypoints are spaced, so try a short file first. Routes and tracks (rte, trk) aren't supported, and planning a long route by hand is slow.
Do I need to jailbreak my iPhone to fake GPS on a Mac?
No. Xcode, pymobiledevice3 and GPS Phantom use the location simulation Apple builds into iOS for developers, which needs Developer Mode and changes nothing else on the phone. Public jailbreaks exist only for older iOS versions, so they aren't an option on a current iPhone anyway.
Is it safe to turn on Developer Mode on my iPhone?
Apple says Developer Mode reduces the device's security, because it lets locally installed development software run. That's why it needs a restart and a passcode confirmation. It doesn't affect apps you install from the App Store. Turn it off in Settings, Privacy & Security when you're done, then restart.
Can apps tell my iPhone location is simulated from a Mac?
An app that checks can. Since iOS 15, Core Location says whether a location came from software simulation, and the app decides what to do about it. A Mac and a PC make no difference. Most apps never look, though some games do.
Does this work on iOS 26 and iOS 27?
Apple's Xcode 27 requirements list debugging on devices running iOS 17 or later, and GPS Phantom needs iOS 17.4 or later, so both cover iOS 26 and iOS 27. pymobiledevice3's docs have iOS 27 notes too. If a command says the phone is newer than the tool's disk image, update pymobiledevice3.
How do I get my real location back?
In Xcode, choose Don't Simulate Location from the same button. With pymobiledevice3, run pymobiledevice3 developer dvt simulate-location clear. In GPS Phantom, Deactivate releases the simulated location, and Reset to real location puts the iPhone back where it really is. Then open Maps to confirm the blue dot has moved back before you check any other app.