Post

Replies

Boosts

Views

Activity

Reply to How to get the same swimming distance like in the Fitness app
Hello, We have 2 issues on our side. 1. We struggle with distances in Fitness app. As we can see with this activity (a real activity), when we compare Total Distance with the Sum of All Sets, both distances are different. Total Distance = 1050 m Sum of All Sets = 1025 m There are 25 m difference between total values and set details. 2. Then, on our side, we have 2 options to calculate swimming distance but we don’t know which one is the best to use. a Option 1 : pool length * number of laps = swimming distance With this option, we see that distance is matching total distance from Fitness app. But for some activities (are shown above), some distance per set (segment) are different than from Fitness app. b Option 2 : Fetch all distances values via HKQuantityTypeIdentifier.distanceSwimming (HKSampleQuery) . With this option, we see that distance is matching sum of all sets distance from Fitness app. But for some activities (are shown above), total distance is different than from Fitness app. Also we added more screenshots from the Fitness app and raw data from that workout sesseion. apple_workouts25032025B_Option2.json
Mar ’25