Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add getWorkoutPlanId function #76

Merged
merged 67 commits into from
Sep 13, 2023
Merged

Conversation

walterholohan
Copy link
Contributor

WorkoutKit will be released in the next week with iOS17 which allows you to get a workout plan for an activity. I have created a separate function to get a workout plan id if you know the workout UUID. This is useful for match planned workouts to completed activities in Apple Health

@robertherber
Copy link
Member

I'm guessing the reason it's not working currently is that it's wrapped in a task that resolves after the dict has already been returned to the JS side.

An extra method for just fetching an ID feels a bit verbose - or what do you think? Is there any data more than the ID itself that could be returned about the Workout Plan that could be interesting? But maybe this would fit better in it's very own query function (which could be either getWorkoutPlanByWorkoutId or getWorkoutPlanById)?

@walterholohan
Copy link
Contributor Author

@robertherber thanks for the feedback I have now updated the function so it returns the workoutPlan (id and activityType fields for now)

@walterholohan
Copy link
Contributor Author

@robertherber can I get another review please?

feat: allow totals in saveWorkoutSamples
@github-actions
Copy link

Expo preview is ready for review.

There should soon be a new native build available here

With that installed just scan this QR code:
QR Preview

@robertherber robertherber merged commit b59222b into kingstinct:master Sep 13, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants