ORKDeviceMotionRecorder Class Reference
Inherits from | ORKRecorder : NSObject |
---|---|
Declared in | ORKDeviceMotionRecorder.h |
The ORKDeviceMotionRecorder
class represents a recorder that requests and collects device motion data from CoreMotion at a fixed frequency.
To ensure that the motion recorder continues to record when the app enters the
background, use the background task support provided by UIApplication
.
frequency
The frequency of motion data collection from CoreMotion in hertz (Hz).
@property (nonatomic, readonly) double frequency
Declared In
ORKDeviceMotionRecorder.h
– initWithIdentifier:frequency:step:outputDirectory:
Returns an initialized device motion recorder using the specified frequency.
- (instancetype)initWithIdentifier:(NSString *)identifier frequency:(double)frequency step:(nullable ORKStep *)step outputDirectory:(nullable NSURL *)outputDirectory
Parameters
identifier |
The unique identifier of the recorder (assigned by the recorder configuration). |
---|---|
frequency |
The frequency of motion data collection from CoreMotion in hertz (Hz). |
step |
The step that requested this recorder. |
outputDirectory |
The directory in which the device motion data should be stored. |
Return Value
An initialized motion data recorder.
Declared In
ORKDeviceMotionRecorder.h