Walks, Vibes, and Code: Vibe coding a GPX Viewer and iOS HealthKit Exporter using Claude Code
The Unexpected Inspiration
It all started during a casual walk with a coworker. As an iPhone user, I’ve been tracking my routes with Apple Health for years, while my Android-using colleague relies on different tools. When I took him on a scenic new path he hadn’t explored before, he naturally asked if I could share the route.
That simple request revealed a gap in Apple’s ecosystem that I hadn’t thought about before. While my Health app diligently collects my workout data, sharing that information outside Apple’s walled garden isn’t straightforward at all. This got me thinking about all that valuable GPS data stored in HealthKit and how I might liberate it in a format that would work for anyone.
The GPX Solution
GPX (GPS Exchange Format) was the obvious choice for this project. It’s an XML schema specifically designed for exchanging GPS data between apps and websites. Pretty much everything supports it, making it perfect for sharing routes with friends regardless of what devices they’re using.
So I had this idea for a two-part solution: an iOS app that could pull workout data from HealthKit and save it as GPX files, and a web app where anyone could upload and view these GPX tracks on a map. Simple enough in theory, right?
Building with Claude Code
Rather than starting from scratch and writing every line of code myself, I decided to try using Claude Code to help out. This approach has recently been dubbed “vibe coding” online – where developers focus on the creative vision while using AI to handle technical implementation details. I thought Claude would be a good partner to handle the technical heavy lifting while I focused on the overall concept and user experience.
The iOS App: WorkoutGPX
For the iPhone app, I needed something that could talk to HealthKit, grab workout data, convert the GPS coordinates into GPX format, and let users export the files. Nothing too fancy, just functional.
Claude Code helped me generate most of the Swift code I needed. It handled the HealthKit authorization requests, the workout query functionality, and the logic for converting coordinates to GPX format. The UI isn’t winning any design awards, but it gets the job done.
The biggest headache came from Apple’s privacy-focused approach to HealthKit. Claude wrote code to request read-only access to health data, but missed a critical detail: due to Apple’s privacy design, apps cannot programmatically check if they already have read access to HealthKit data. This sent me down a debugging rabbit hole that AI couldn’t help with. I spent quite a bit of time figuring out that you simply can’t check if you have permission – you just have to request it and handle whatever happens next.
The Web App: GPX Track Viewer
The web component was more straightforward. I needed something that could accept GPX file uploads, show them on a map, and let users toggle between different tracks or share specific views.
Claude Code was particularly useful here, helping with the FastAPI backend for handling uploads and the JavaScript for the interactive map. Nothing groundbreaking, but solid functionality that didn’t require me to reinvent the wheel.
Try it for yourself here https://gpx.geosq.com
Lessons Learned
This project taught me a few things about developing with AI assistance that I thought might be worth sharing.
Claude Code proved to be excellent, performing at the level of a seasoned developer while only requiring clear instructions to accomplish tasks. It would proactively run build commands and fix errors in an agentic way, making it seamless to use alongside Xcode and VSCode throughout the development process.
I leveraged some useful slash commands in Claude Code that significantly improved my workflow: /init
for creating a CLAUDE.md file that defines project structure and code style guidelines, /cost
to monitor token usage during the session, and /clear
to reset the context between tasks to optimize token costs.
While Claude Code handled most technical aspects expertly, it occasionally missed platform-specific quirks. The HealthKit privacy issue is a perfect example – that’s the kind of thing you only learn through experience or diving deep into documentation.
I also found that my intuitive approach to coding paired well with Claude’s capabilities. I could sketch out what I wanted at a high level, and Claude would fill in the technical details with the precision of an experienced developer.
Testing remains crucial, though. Despite generating high-quality code, real-world testing revealed edge cases that required manual fixes. No amount of AI assistance can replace actually running your app and seeing how it behaves with real data.
The Result
In the end, I got what I wanted: a way to share my walking routes with friends regardless of what phones they use. The iOS app lets me extract my workout routes from HealthKit and save them as GPX files, while the web app provides a simple way to view those routes on a map.
Both projects are up on GitHub if you’re interested in checking them out or contributing:
- WorkoutGPX for the iOS app
- GPX Track Viewer for the web component
What’s Next?
While the current setup does what I need, I’ve got some ideas for future improvements. Maybe adding workout stats alongside the route data, or supporting batch exports for people with lots of workouts to share. I’d also like to improve the elevation visualization and maybe add direct sharing between the iOS app and web viewer.
Final Thoughts
What started as a simple “hey, can you share that route with me?” turned into a weekend project that taught me a lot about both HealthKit’s limitations and the current state of AI-assisted development.
Using Claude Code definitely sped things up, even if it couldn’t solve every problem. It handled the routine coding tasks while I focused on design decisions and troubleshooting the platform-specific issues that inevitably cropped up.
So the next time you’re out walking with friends who use different phones, remember that sharing your journey might be just a file export away. And if you’re a developer with an idea to scratch your own itch, consider giving AI assistance a try – it might not be perfect, but it can certainly help you build something useful faster than you’d expect.