I figured out that the app im developing not the sample project was causing the HealthKit service to corrupt which subsequently caused the freeze in HKLiveWorkoutBuilder. Below is the code for how i end and start workouts in my app. I cant figure out why healthkit gets corrupted. func start() async throws { guard !sessionState.isActive else { return } let configuration = HKWorkoutConfiguration() configuration.activityType = .swimming configuration.locationType = .outdoor configuration.swimmingLocationType = .openWater if extendedSession == nil { extendedSession = WKExtendedRuntimeSession() } session = try HKWorkoutSession(healthStore: store, configuration: configuration) builder = session?.associatedWorkoutBuilder() builder?.dataSource = HKLiveWorkoutDataSource(healthStore: store, workoutConfiguration: configuration) session?.delegate = self builder?.delegate = self print(💧 Submersion Manager: (manager == nil ? Unavalible : Running)) //session?.startActivity(with: .now) try await withTimeout(for: .seconds(10
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags: