ORKLocationRecorder Class Reference

Inherits from ORKRecorder : NSObject
Declared in ORKLocationRecorder.h
ORKLocationRecorder.m

Overview

The ORKLocationRecorder class represents a recorder for collecting location data from CoreLocation.

Because location data is sensitive information, you need to take special care in handling it, including removoing or otherwise preparing it for a anonymous data set.

The accuracy of location data may be limited indoors.

Other Methods

– initWithIdentifier:step:outputDirectory:

Returns an initialized location recorder.

- (instancetype)initWithIdentifier:(NSString *)identifier step:(nullable ORKStep *)step outputDirectory:(nullable NSURL *)outputDirectory

Parameters

identifier

The unique identifier of the recorder (assigned by the recorder configuration).

step

The step that requested this recorder.

outputDirectory

The directory in which the location data should be stored.

Return Value

An initialized location recorder.

Declared In

ORKLocationRecorder.h

  locationManager

The location manager, if any, being used by this recorder.

@property (nonatomic, strong, nullable, readonly) CLLocationManager *locationManager

Declared In

ORKLocationRecorder.h

Other Methods

– start

Starts data recording.

- (void)start

Discussion

If an error occurs when recording starts, it is returned through the delegate.

Declared In

ORKRecorder.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

– finishRecordingWithError:

Indicates that recording has failed; stop recording and report the error to the delegate

- (void)finishRecordingWithError:(NSError *)error

Parameters

error

Error that occurred.

Declared In

ORKRecorder_Private.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