SKPositionsLoggingService Class Reference

Inherits from NSObject
Declared in SKPositionsLoggingService.h

Overview

Service for logging the device’s GPS positions to a file, in different formats ( LOG and GPX ). After calling startLoggingPositionsToFileAtPath:withLoggingType:, make sure you also call stopLoggingPositions. Otherwise, GPX tags won’t properly close and the saved file might be corrupted.

+ sharedInstance

Returns the singleton SKPositionsLoggingService instance.

+ (instancetype)sharedInstance

Discussion

Returns the singleton SKPositionsLoggingService instance.

Declared In

SKPositionsLoggingService.h

– startLoggingPositionsToFileAtPath:withLoggingType:

Starts logging device positions to a file at a specified path.

- (BOOL)startLoggingPositionsToFileAtPath:(NSString *)filePath withLoggingType:(SKPositionsLoggingType)loggingType

Parameters

filePath

The path to a file ( with no extension ) that the logger will write in. The file will be created if it doesn’t exist.

loggingType

The format of the logged positions ( GPX or LOG ). Based on this parameter, a proper file extension will be added to the file.

Return Value

Succes/Failure of the operation.

Discussion

Starts logging device positions to a file at a specified path.

Declared In

SKPositionsLoggingService.h

– addWaypointToCurrentLoggingFile:

Adds a custom waypoint to the current logging file.

- (BOOL)addWaypointToCurrentLoggingFile:(SKCoordinate *)waypoint

Parameters

waypoint

The custom object to be added.

Return Value

Succes/Failure of the operation.

Discussion

Adds a custom waypoint to the current logging file.

Declared In

SKPositionsLoggingService.h

– pauseLoggingPositions

Pauses logging to current file.

- (BOOL)pauseLoggingPositions

Return Value

Succes/Failure of the operation.

Discussion

Pauses logging to current file.

Declared In

SKPositionsLoggingService.h

– resumeLoggingPositions

Resumes logging to current file, after a pause.

- (BOOL)resumeLoggingPositions

Return Value

Succes/Failure of the operation.

Discussion

Resumes logging to current file, after a pause.

Declared In

SKPositionsLoggingService.h

– stopLoggingPositions

Stops logging to current file. This closes any GPX opened tags and closes the file. It’s mandatory to be called, after a startLoggingPositionsToFileAtPath:withLoggingType: call.

- (BOOL)stopLoggingPositions

Return Value

Succes/Failure of the operation.

Discussion

Stops logging to current file. This closes any GPX opened tags and closes the file. It’s mandatory to be called, after a startLoggingPositionsToFileAtPath:withLoggingType: call.

Declared In

SKPositionsLoggingService.h