One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKWorkoutEvent

class · iOS 8.0+ · SDK 27.1

class HKWorkoutEvent

Members (7)

init · iOS 8.0+ · Deprecated in iOS 11.0

init

TypeScript
static initTypeDate(type: HKWorkoutEventType, date: globalThis.Date): HKWorkoutEvent
Swift declaration
convenience init(type: HKWorkoutEventType, date: Date)
init · iOS 10.0+ · Deprecated in iOS 11.0

init

TypeScript
static initTypeDateMetadata(type: HKWorkoutEventType, date: globalThis.Date, metadata: Record<string, unknown>): HKWorkoutEvent
Swift declaration
convenience init(type: HKWorkoutEventType, date: Date, metadata: [String : Any])
init · iOS 11.0+

init

TypeScript
static initTypeDateIntervalMetadata(type: HKWorkoutEventType, dateInterval: _Foundation_DateInterval, metadata?: (Record<string, unknown>) | null): HKWorkoutEvent
Swift declaration
convenience init(type: HKWorkoutEventType, dateInterval: DateInterval, metadata: [String : Any]?)
get · iOS 8.0+ · Deprecated in iOS 11.0

date

TypeScript
get date(): globalThis.Date
Swift declaration
var date: Date { get }
get · iOS 11.0+

dateInterval

TypeScript
get dateInterval(): _Foundation_DateInterval
Swift declaration
var dateInterval: DateInterval { get }
get · iOS 10.0+

metadata

TypeScript
get metadata(): (Record<string, unknown>) | null
Swift declaration
var metadata: [String : Any]? { get }
get · iOS 8.0+

type

TypeScript
get type(): HKWorkoutEventType
Swift declaration
var type: HKWorkoutEventType { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HKWorkoutEvent.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All HealthKit types →