Skip to content

Commit

Permalink
chore: handle xcode 14
Browse files Browse the repository at this point in the history
  • Loading branch information
walterholohan committed Sep 8, 2023
1 parent 81a5e01 commit 7ecfd9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/ReactNativeHealthkit.swift
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 7ecfd9b

Please sign in to comment.