addMetadata
TypeScriptaddMetadata(metadata: Record<string, unknown>, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc addMetadata(_ metadata: [String : Any]) async throwsclass · iOS 12.0+ · SDK 27.1
class HKWorkoutBuilderaddMetadata(metadata: Record<string, unknown>, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc addMetadata(_ metadata: [String : Any]) async throwsadd(samples: Array<HKSample>, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc addSamples(_ samples: [HKSample]) async throwsaddWorkoutActivity(workoutActivity: HKWorkoutActivity, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc addWorkoutActivity(_ workoutActivity: HKWorkoutActivity) async throwsaddWorkoutEvents(workoutEvents: Array<HKWorkoutEvent>, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc addWorkoutEvents(_ workoutEvents: [HKWorkoutEvent]) async throwsbeginCollection(startDate: globalThis.Date, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc beginCollection(at startDate: Date) async throwsdiscardWorkout(): voidSwift declarationfunc discardWorkout()elapsedTime(date: globalThis.Date): numberSwift declarationfunc elapsedTime(at date: Date) -> TimeIntervalendCollection(endDate: globalThis.Date, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc endCollection(at endDate: Date) async throwsfinishWorkout(completion: ((arg0: (HKWorkout) | null, arg1: (NativeError) | null) => void)): voidSwift declarationfunc finishWorkout() async throws -> HKWorkout?static init(healthStore: HKHealthStore, configuration: HKWorkoutConfiguration, device?: (HKDevice) | null): HKWorkoutBuilderSwift declarationinit(healthStore: HKHealthStore, configuration: HKWorkoutConfiguration, device: HKDevice?)seriesBuilder(seriesType: HKSeriesType): (HKSeriesBuilder) | nullSwift declarationfunc seriesBuilder(for seriesType: HKSeriesType) -> HKSeriesBuilder?statistics(quantityType: HKQuantityType): (HKStatistics) | nullSwift declarationfunc statistics(for quantityType: HKQuantityType) -> HKStatistics?updateActivityUuidAddingCompletion(UUID: string, metadata: Record<string, unknown>, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc updateActivity(uuid UUID: UUID, adding metadata: [String : Any]) async throwsupdateActivityUuidEndCompletion(UUID: string, endDate: globalThis.Date, completion: ((arg0: boolean, arg1: (NativeError) | null) => void)): voidSwift declarationfunc updateActivity(uuid UUID: UUID, end endDate: Date) async throwsget allStatistics(): NativeMap<HKQuantityType, HKStatistics>Swift declarationvar allStatistics: [HKQuantityType : HKStatistics] { get }get device(): (HKDevice) | nullSwift declaration@NSCopying var device: HKDevice? { get }get endDate(): (globalThis.Date) | nullSwift declarationvar endDate: Date? { get }get metadata(): Record<string, unknown>Swift declarationvar metadata: [String : Any] { get }get startDate(): (globalThis.Date) | nullSwift declarationvar startDate: Date? { get }get workoutActivities(): Array<HKWorkoutActivity>Swift declarationvar workoutActivities: [HKWorkoutActivity] { get }get workoutConfiguration(): HKWorkoutConfigurationSwift declaration@NSCopying var workoutConfiguration: HKWorkoutConfiguration { get }get workoutEvents(): Array<HKWorkoutEvent>Swift declarationvar workoutEvents: [HKWorkoutEvent] { get }zoneConfiguration(quantityType: HKQuantityType): Promise<(HKWorkoutZoneConfiguration) | null>Swift declarationfunc zoneConfiguration(for quantityType: HKQuantityType) async throws -> HKWorkoutZoneConfiguration?Returns the zone configuration being used for the specified quantity type in this workout. If a custom configuration has been set via `setZoneConfiguration(_:for:)`, that configuration is returned. Otherwise, this method fetches and returns the user's preferred workout zone configuration from the health store. - Parameter quantityType: The quantity type to retrieve the configuration for. - Returns: The active zone configuration, or nil if no custom configuration has been set and the user has no preferred configuration for the quantity type. - Throws: An error if the configuration cannot be retrieved.
setCustomZoneConfiguration(configuration: (HKWorkoutZoneConfiguration) | null, quantityType: HKQuantityType): Promise<void>Swift declarationfunc setCustomZoneConfiguration(_ configuration: HKWorkoutZoneConfiguration?, for quantityType: HKQuantityType) async throwsSets the zone configuration for the specified quantity type for this workout. In order to provide a custom workout zone configuration, this must be called before beginning collection on the builder. If a custom configuration is not provided, the user's preferred workout zone configuration will be used for zone calculations. - Parameter configuration: The zone configuration to use. Setting to `nil` will remove any custom configuration and use the preferred zone configuration for the quantity type. - Parameter quantityType: The quantity type to apply the configuration to. - Throws: An error if the configuration cannot be set or is incompatible with the quantity type.
zoneGroup(quantityType: HKQuantityType): (HKWorkoutZoneGroup) | nullSwift declarationfunc zoneGroup(for quantityType: HKQuantityType) -> HKWorkoutZoneGroup?Returns the current zone group for the specified quantity type, including real-time duration calculations. - Parameter quantityType: The quantity type to retrieve zone information for. - Returns: The zone group with current time-in-zone data, or nil if no zone information is available.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
HKWorkoutBuilder.init()
inherited init: cannot prove legal (class declares 1 custom initializer)