I am developing an iOS application that utilizes running workout data from the iOS Health app / Fitness app via HealthKit, with explicit user permission.
Before finalizing the app design, I would like to clarify several technical aspects related to data reliability, manual entry, record modification, and GPS route availability in HealthKit.
My questions are as follows: 1. Identifying manually added (non-physical) running workouts When a running workout is created in the Health app without actual physical movement (for example, a workout manually added by the user), is there any metadata, flag, or key in HealthKit that allows developers to distinguish these records from workouts generated through actual motion tracking (iPhone or Apple Watch)? 2. Editing existing running workout records Is it possible for users, or for third-party apps with HealthKit write permission, to edit an existing running workout (e.g., distance, duration, calories) after it has been saved? • If edits are allowed, are the original values preserved in any way, or are they fully overwritten? 3. Detecting modified workout records If a running workout (whether originally auto-recorded or manually created) has been edited after creation, is there any identifier, metadata field, source revision, or versioning mechanism in HealthKit that allows developers to detect that the workout has been modified? 4. Access to GPS route / running path data For outdoor running workouts recorded with location services enabled: • Does HealthKit provide access to GPS route data (running paths / location traces) associated with a workout? • Is this route data accessible to third-party apps with user permission? • Is route data available only for workouts recorded on Apple Watch, or also for iPhone-only recordings? • Is there a way to determine programmatically whether a running workout includes valid GPS route data?
The overall goal is to understand whether, when building an app that relies on HealthKit running data, it is technically possible to differentiate motion-based workouts from manually added or edited records, and to assess the availability of route information for outdoor runs.
Any clarification or references to official documentation would be greatly appreciated.
Thank you