GPXExplore – A GPX Track Viewer for iOS and macOS
Since creating the app to export HealthKit gps data to GPX files, I noticed that there are lots of opportunities for sharing track data such as following trails, bike rides etc. A colleage of mine completed the TD bike tour and used Garmin device to track his path, but also some other meta data such as hear rate, cadence etc. I wanted to build a stand alone app by extracting the GPX viewer from WorkoutGPX app and this is the result.
The GPX File
GPX (GPS Exchange Format) is an XML schema specifically designed for exchanging GPS data between apps and websites.
A GPX file contains three main elements:
- Tracks: A series of points (trackpoints) that form a path, typically containing latitude, longitude, elevation, and timestamp
- Waypoints: Individual points of interest with names and descriptions
- Routes: Ordered lists of waypoints representing a planned path
Each track can be divided into segments, useful for separating different parts of a journey (like rest stops or different activities). Trackpoints often include additional metadata like:
- Heart rate
- Cadence (for cycling)
- Speed
- Temperature
- Power (for cycling)
This rich data structure makes GPX files ideal for sharing detailed activity information across different platforms and devices.
Here is an example track point with some additional meta data
<trkpt lat="40.67695691250264644622802734375" lon="-73.46442407928407192230224609375">
<ele>6.19999980926513671875</ele>
<time>2025-04-19T13:04:16.000Z</time>
<extensions>
<ns3:TrackPointExtension>
<ns3:atemp>18.0</ns3:atemp>
<ns3:hr>102</ns3:hr>
<ns3:cad>0</ns3:cad>
</ns3:TrackPointExtension>
</extensions>
</trkpt>
When testing this app, I used https://github.com/gps-touring/sample-gpx for example gpx files.
Also some examples from https://www.topografix.com/gpx_sample_files.asp
The iOS App: GPXExplore
The Mac App: GPXExplore
From the same shared source, its very convenient to build a Mac app also at the same time. I chose to build a document based app
Quicklook
I tried quicklook integration, but was a little disappointed that quicklook does not have access to network for map tiles, so I showed stats from the gpx track and also a path.
Setting the Document icon for GPX
One interesting challenge with GPX files is that they’re technically XML files, which means they often show up with a generic XML icon in macOS and iOS. To make them more recognizable, you need to:
- Register a custom UTI (Uniform Type Identifier) in your app
- Create and register a custom document icon
- Handle file type associations in your app’s Info.plist
- For iOS, you’ll need to declare the file type in your app’s document types
This is why many GPX files you download might show up with a generic XML icon until you open them with a dedicated GPX viewer app. This is still work in progress