ORKPedometerRecorderConfiguration Class Reference

Inherits from ORKRecorderConfiguration : NSObject
Declared in ORKPedometerRecorder.m
ORKRecorder.h

Overview

The ORKPedometerRecorderConfiguration class represents a configuration that records pedometer data during an active step.

Pedometer data consists of information about the processed steps provided by CoreMotion, obtained from a CMPedometer object. The pedometer object essentially reports the total number of steps taken since the start of recording, updating the value every time a significant number of steps have been detected.

Pedometer data is serialized to JSON and returned as an ORKFileResult object. For details on the format, see CMPedometerData+ORKJSONDictionary.

To use a recorder, include its configuration in the recorderConfigurations property of an ORKActiveStep object, include that step in a task, and present it with a task view controller.

– initWithIdentifier:

Returns an initialized pedometer recorder configuration.

- (instancetype)initWithIdentifier:(NSString *)identifier

Parameters

identifier

The unique identifier of the recorder configuration.

Return Value

An initialized pedometer recorder configuration.

Discussion

The recorder instantiates a CMPedometer object, so no additional parameters besides the identifier are required.

This method is the designated initializer.

Declared In

ORKRecorder.h

– recorderForStep:outputDirectory:

Returns a recorder instance using this configuration.

- (ORKRecorder *)recorderForStep:(ORKStep *)step outputDirectory:(NSURL *)outputDirectory

Parameters

step

The step for which this recorder is being created.

outputDirectory

The directory in which all output file data should be written (if producing ORKFileResult instances).

Return Value

A configured recorder instance.

Declared In

ORKRecorder.h

– initWithCoder:

Returns a new pedometer recorder configuration initialized from data in the given unarchiver.

- (instancetype)initWithCoder:(NSCoder *)aDecoder

Parameters

aDecoder

Coder from which to initialize the pedometer recorder configuration.

Return Value

A new pedometer recorder configuration.

Declared In

ORKRecorder.h

– requestedPermissionMask

Returns the permission mask indicating the permissions required for this configuration.

- (ORKPermissionMask)requestedPermissionMask

Discussion

This method is typically overridden in new recorder configuration subclasses.

Declared In

ORKRecorder_Private.h