WorkoutKit

RSS for tag

The WorkoutKit framework provides the ability to create, preview, and schedule planned workouts for the Workout app on Apple Watch.

WorkoutKit Documentation

Posts under WorkoutKit tag

30 Posts
Sort by:
Post not yet marked as solved
5 Replies
1.7k Views
Hello folks, I have been observing a strange behaviour on my Apple Watch Ultra. Device Environment: Apple Watch Ultra on WatchOS 10 Beta Offline Disconnected from companion iPhone Workout active: "Walking" Expected behaviour: The workout should record accurate locations (with accuracy of approximately 3-4 meters). This level of accuracy is already being achieved in the same watch (verified using several GPS status apps) when a workout is not active. . Observed behaviour: Accuracy as good as 2 meter is observed when no workouts are active, but as soon as the workout starts, the accuracy drops to a maximum of 14 meters and never gets better than this. This is confirmed to be happening every single time and is verified using several GPS status apps during the workout. Does anyone else has faced similar behaviour?
Posted Last updated
.
Post not yet marked as solved
0 Replies
400 Views
Hi there, Thanks for the great tutorial for WorkoutKit, that can be found here: https://developer.apple.com/videos/play/wwdc2023/10016/ In my view Text(scheduledWorkout.plan.workout.activity.displayName) in SamplePlannerView.swift (the main view) does not show the correct string. For example for the running workout, it should show: "New Running Workout". This string is set in WorkoutStore.swift. However, it shows "Outdoor Running", which is the type of workout but not the display name that was given to it. Best regards, Patrick
Posted
by PatDelft.
Last updated
.
Post not yet marked as solved
2 Replies
797 Views
Hi, I'm the developer of Open Water Swim, and I have had multiple reports and have also confirmed with my own testing that the WatchOS 10 update has seriously degraded GPS data during open water swimming, both with the native Workout app and with Open Water Swim. The data provided by CoreLocation is no longer accurate or trustworthy. I will post several pictures showing before and after update swims: Here's the raw data (mapped) of a swim done with watchOS 9 on the Ultra. Same swim today: From another pair of users: These two went TOGETHER, one with watchOS 9 and one with watchOS 10. You can probably guess which is which. Watch OS 9 swim: SAME SWIM WITH A PARTNER ON WATCHOS 10 (beta here) And another, again, two people swimming together, one watchOS 9 and one watchOS 10. watchOS 9 Same swim, same time, watchOS 10 I have filed two feedback assistant reports with APPLE. One when it was still a beta issue: FB12587468. This one has zero response from apple. And now a second one filed with watchOS 10 release: FB13192409 Apple devs, I know you're here and listening, so please let's get this fixed ASAP. Thanks
Posted
by visskiss.
Last updated
.
Post not yet marked as solved
2 Replies
465 Views
Hi! How can I authorize the WorkoutScheduler permissions after I denied if I can't see any option in Settings to make it? (Like Notification or Localization permission) Thank you! Victor Kπ
Posted
by pluginboy.
Last updated
.
Post not yet marked as solved
0 Replies
363 Views
Hey team! I have a question that feels very obvious, but I cannot seem to find the answer in the documentation. Using HealthKit/WorkoutKit, how you can make workouts with different activity types? Say you do 10 minutes of traditionalStrengthTraining followed by 10 minutes of running (common for crossfit and similar high intensity workout styles)? From the docs, it looks like you can’t change the activity type on an HKWorkout and the new dividing workouts into activities concept seems to only be for swimBikeRun workouts. Do you simply make multiple consecutive HKWorkoutSession instances, e.g doing startActivity -> beginCollection -> endCollection multiple times? Any input is highly appreciated!
Posted Last updated
.
Post marked as solved
1 Replies
479 Views
Hi, I am running the "Building a multidevice workout app" sample: https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/building_a_multidevice_workout_app I do not get any values for the .cyclingSpeed Value? Is this correct or should there be any value while moving around? Also i wonder if i can get the GPS values like altimeter or location from the HKWorkoutSession? Thanks
Posted
by boerni.
Last updated
.
Post marked as solved
3 Replies
459 Views
I'm using Xcode Version 15.0 beta (15A5160n) and getting the following error: Value of type 'HKWorkoutSession' has no member 'sendToRemoteWorkoutSession' Any idea what's causing this? I pulled the code from https://developer.apple.com/videos/play/wwdc2023/10023/
Posted
by alanwill.
Last updated
.
Post not yet marked as solved
0 Replies
444 Views
Hi! I'm working on WorkoutKit application and, when I'm running my UI Tests, I added an InterruptionMonitor for the WorkoutScheduler access popup, but the second time I launch the UITests, the Popup does not appear anymore cause the permission is guaranteed. The only solution that I've dounded is to add the app.resetAuthorizationStatus into the tearDown, but the parameter I should provide to this method, is a XCUIProtectedResource which does not contain any enum case that match with what I'm looking for. Does someone find a solution for that? Thanks, Victor Kπ
Posted
by pluginboy.
Last updated
.
Post not yet marked as solved
1 Replies
444 Views
I tried the sample code from 'Customizing workouts with WorkoutKit' all works fine on the simulator, however, I have the following error when testing on device (iPhone SE): Error Domain=WorkoutKit.StateError Code=0 "(null)" On launch, this is associated with 'failed to retrieve scheduled plans'. Also the same when requesting authorization. Any ideas on this one?
Posted Last updated
.