Classes

The following classes are available globally.

  • The audio session controller to use when recording motion sensor data in the background with the phone screen locked.

    Note

    Using this audio session controller includes playing an audio file in the background in order to keep the app responsive to step transitions and voice commands. Without the audio playing in the background or the use of GPS, the app will stop responding to timing events.
    See more

    Declaration

    Swift

    public final class RSDMotionAudioSessionController : NSObject, RSDAudioSessionController
  • RSDMotionAuthorization is a wrapper for the CoreMotion 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.

    Before using this adaptor with a permission step, the calling application or framework will need to register the adaptor using RSDAuthorizationHandler.registerAdaptorIfNeeded().

    Seealso

    RSDPermissionsStepViewController
    See more

    Declaration

    Swift

    public final class RSDMotionAuthorization : RSDAuthorizationAdaptor
  • RSDMotionRecorder is a subclass of RSDSampleRecorder that implements recording core motion sensor data.

    You will need to add the privacy permission for motion sensors to the application Info.plist file. As of this writing (syoung 02/09/2018), the required key is:

  • Privacy - Motion Usage Description

  • Note

    This recorder is only available on iOS devices. CoreMotion is not supported by other platforms.

    Seealso

    RSDMotionRecorderType, RSDMotionRecorderConfiguration, and RSDMotionRecord.

    See more

    Declaration

    Swift

    @available(iOS 10.0, *)
    public class RSDMotionRecorder : RSDSampleRecorder
  • This background task is a work-around for a running task that uses the motion sensors with the screen locked. If using GPS or a streaming audio file, using this object is not required to keep the task active in the background.

    See more

    Declaration

    Swift

    open class RSDMotionTaskObject : RSDTaskObject, RSDBackgroundTask