Mirrage

How to Use a GPX File on iPhone to Simulate a Route

What a GPX file is, where to get or make one, and how to play it back as your iPhone's location - with or without Xcode.

20 September 2026 · 2 min read

GPX files are the standard way to describe a route: a list of GPS points, often with times. Runners export them from Strava, hikers download them for trails, and developers use them to test location features. You can also use one to make your iPhone follow that exact route.

What's inside a GPX file

A GPX file is plain text (XML). The parts that matter look like this:

<trkpt lat="51.5007" lon="-0.1246"><time>2026-09-20T09:00:00Z</time></trkpt>
<trkpt lat="51.5010" lon="-0.1240"><time>2026-09-20T09:00:20Z</time></trkpt>

Each trkpt is a point on the route. Some files use waypoints (wpt) or route points (rtept) instead. Good players handle all three.

Where to get a GPX file

  • Fitness apps - Strava, Garmin Connect and Komoot all let you export an activity or route as GPX.
  • Route planners - sites like gpx.studio let you draw a route on a map and download it.
  • Hiking and cycling sites - many publish trails as GPX.

Option 1: Play a GPX file with Xcode

If you're a developer with a Mac:

  1. Add the GPX file to an Xcode project.
  2. Run any app on your connected iPhone.
  3. In the debug bar, choose Simulate Location and pick your file.

The phone follows the points. It works, but the phone stays tethered to Xcode and the timing can be robotic.

Option 2: Import a GPX file in Mirrage

Mirrage imports GPX files directly on the phone:

  1. Save the GPX file to the Files app (AirDrop, email or a download all work).
  2. In Mirrage, open Settings → Import a GPX route and choose the file.
  3. The route appears in your Places. Tap it and press Go.

Mirrage reads tracks, routes and waypoints, then plays the route with realistic speeds, so the movement looks natural rather than jumping between points.

Tips

  • Big files are fine, but very dense tracks (one point per second) can be simplified in gpx.studio first.
  • Check the start point. Starting a route on another continent from where you "were" five minutes ago looks odd to apps.
  • Want a route without a file? Just search for a destination and use route simulation - Mirrage plans the roads for you.

FAQ

Can iPhone open GPX files natively?

iOS can store GPX files in the Files app, but it can't play them as your location by itself. You need Xcode or an app like Mirrage.

Why is my GPX file greyed out when importing?

Some file pickers only accept files they recognise. Mirrage declares the GPX type so files show up; if one is still greyed out, check that it ends in .gpx.

Does GPX playback work without a computer?

With Mirrage, yes - after the one-time setup, GPX routes play entirely on the phone.

Keep reading