Documentation

MotionPermissionsView

A SwiftUI View that introduces access to Core Motion data and receives interaction events for initiating Music permissions from the system.

Motion Activity data reflects whether the user is walking, running, in a vehicle, or stationary for periods of time.

MotionPermissionsView with a light color scheme. A SwiftUI Starter Kit Component.
MotionPermissionsView with a light color scheme.
MotionPermissionsView with a dark color scheme. A SwiftUI Starter Kit Component.
MotionPermissionsView with a dark color scheme.

Usage

MotionPermissionsView(
    interactor: .init(
        didSelectEnable: {
            // Example Usage
            //
            // do {
            //     let controller = MotionController()
            //     try? controller.startMotionActivityUpdates()
            // }
        },
        didSelectSkip: {}
    )
)

Features

  • Supports light and dark device color schemes by default.
  • Supports font scaling via Dynamic Type.
  • Supports usage in SwiftUI Previews for easy debugging and testing.