ORKHealthQuantityTypeRecorder Class Reference
Inherits from | ORKRecorder : NSObject |
---|---|
Declared in | ORKHealthQuantityTypeRecorder.h ORKHealthQuantityTypeRecorder.m |
Overview
The ORKHealthQuantityTypeRecorder
class represents a recorder for collecting real time sample data from HealthKit, such as heart rate, during
an active task.
– initWithIdentifier:healthQuantityType:unit:step:outputDirectory:
Returns an initialized health quantity type recorder using the specified quantity type and unit.
- (instancetype)initWithIdentifier:(NSString *)identifier healthQuantityType:(HKQuantityType *)quantityType unit:(HKUnit *)unit step:(ORKStep *)step outputDirectory:(NSURL *)outputDirectory
Parameters
identifier |
The unique identifier of the recorder (assigned by the recorder configuration). |
---|---|
quantityType |
The quantity type that should be collected during the active task. |
unit |
The unit for the data that should be collected and serialized. |
step |
The step that requested this recorder. |
outputDirectory |
The directory in which the HealthKit data should be stored. |
Return Value
An initialized health quantity type recorder.
Declared In
ORKHealthQuantityTypeRecorder.h
– stop
Stops data recording, which generally triggers the return of results.
- (void)stop
Discussion
If an error occurs when stopping the recorder, it is returned through the delegate.
Subclasses should call finishRecordingWithError:
rather than calling super.
Declared In
ORKRecorder.h
– isRecording
A Boolean value indicating whether the recorder is currently recording.
- (BOOL)isRecording
Return Value
YES
if the recorder is recording; otherwise, NO
.
Declared In
ORKRecorder.h