Classes
The following classes are available globally.
-
RSDDistanceRecorder
is intended to be used for recording location where the participant is walking, running, cycling, or other activities outdoors where the distance travelled is of interest. By default, this recorder only logs the relative distance, altitude, course, and speed travelled by the participant. To log GPS coordinates, the configuration file must explicitly be set to do so, and it is recommended to only log the coordinates if the user is a tester in order to ensure the participant’s privacy is respected.At the end of the motion travelled step, the recorder also uses CoreMotion to query the pedometer for the overall distance and step count as measured by the pedometer which are then added to the
RSDCollectionResult
returned by this recorder when it is stopped.This recorder is only available on iOS devices. CoreMotion is not supported by other platforms. Additionally, for a watchOS application that needs to measure distance travelled, creating an HKWorkoutSession offers a more efficient use of the device battery with equivalent accuracy in determining the distance travelled by the participant while performing a distance measuring activity.
This recorder is designed to be run in the background so that the user can lock the screen and place the phone in their pocket or bag. This requires setting the capabilities in your app to include background audio.
Additionally, you will need to add the privacy permission for location and motion sensors to the application
Info.plist
file. As of this writing (syoung 02/08/2018), those keys are:Privacy - Motion Usage Description
Privacy - Location Always and When In Use Usage Description
Privacy - Location When In Use Usage Description
Note
Both location privacy keys are required.
Seealso
RSDDistanceRecorderConfiguration
andRSDDistanceRecord
Declaration
Swift
@available(iOS 10.0, *) public class RSDDistanceRecorder : RSDSampleRecorder, CLLocationManagerDelegate
-
RSDLocationAuthorization
is a wrapper for the CoreLocation library that allows a general-purpose step or task to query this library for authorization if and only if that library is required by the application.Seealso
RSDPermissionsStepViewController
Declaration
Swift
public final class RSDLocationAuthorization : RSDAuthorizationAdaptor