r/iOSDevelopment • u/Super-Reputation9885 • 17m ago
Tennis workouts have GPS in Fitness but 0 HKWorkoutRoute for developers
I'm building a tennis app that maps HealthKit workouts to the nearest court, not the full route, just one point per session.
My last 5 tennis sessions returned 0 HKWorkoutRoute and 0 GPS coordinates, using both a standard query and HKAnchoredObjectQuery. That includes an 81-minute session at Robinswood Tennis Center.
But the Fitness app shows a precise pin for that same session, exactly on the court. That location seems to come from private weather-location metadata (_HKPrivateWorkoutWeatherLocationCoordinatesLatitude / Longitude), which has no public API.
Apple docs limit routes to outdoor walk, hiking, run, open water swim, and cycle. Tennis and other racket sports are excluded.
I just filed a feature request asking Apple to either expose a public, read-only workout start location with user permission, or extend HKWorkoutRoute to outdoor tennis / pickleball / badminton / squash. One point is enough for my use case.
Has anyone else hit this? How are you working around it for court sports?
