Skip to content

Commit

Permalink
Merge branch 'master' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
walterholohan committed Sep 8, 2023
2 parents 3a327e7 + 7ecfd9b commit 8c3dee2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/ReactNativeHealthkit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,7 @@ class ReactNativeHealthkit: RCTEventEmitter {

@available(iOS 17.0.0, *)
func getWorkoutPlan(workout: HKWorkout) async -> [String: Any]? {
#if canImport(WorkoutKit)
do {
let workoutPlan = try await workout.workoutPlan

Expand All @@ -1262,6 +1263,9 @@ class ReactNativeHealthkit: RCTEventEmitter {
} catch {
return nil
}
#else
return nil
#endif
}

@objc(getWorkoutPlanById:resolve:reject:)
Expand Down

0 comments on commit 8c3dee2

Please sign in to comment.