Skip to content
Mobile
Skill

/motion

Stream accelerometer, gyroscope, magnetometer, and orientation samples from connected wearables on iOS

From plugin
meta-wearables-dat-ios
59518 skills

Claude Code

$ npx -y skills add meta/meta-wearables-dat-ios --skill motion --agent claude-code

SKILL.md

motion.SKILL.md
name: motion
description: Stream accelerometer, gyroscope, magnetometer, and orientation samples from connected wearables on iOS

Motion (iOS)

Motion is an experimental capability for streaming inertial sensor samples. Enable it for the app in Wearables Developer Center. It has no runtime `Permission` value.

Attach, observe, and start

Add Motion only after the `DeviceSession` reaches `.started`. Unlike Inputs, Motion is returned stopped: register observers before calling `start()`.

import MWDATCore
import MWDATMotion

let motion = try session.addMotion(
  configuration: MotionConfiguration(samplingRate: .hz30)
)
guard let motion else { return }

let samples = motion.samples
let sampleTask = Task {
  for await sample in samples {
    if let acceleration = sample.accelerometer {
      updateAcceleration(x: acceleration.x, y: acceleration.y, z: acceleration.z)
    }
    if let orientation = sample.orientation {
      updateOrientation(orientation.simd)
    }
  }
}
motion.start()

Retain the sample task while streaming. Observe `statePublisher` for lifecycle updates and `errorPublisher` for sensor, connection, and closure failures.

Sampling rates are 5, 10, 15, 24, 30, and 60 Hz; 10 Hz is the default. Higher rates use more bandwidth and power.

Read samples defensively

`MotionSample.timestampNs` uses the device monotonic clock. Accelerometer values are m/s², gyroscope values are rad/s, and magnetometer values are µT. Accelerometer, gyroscope, magnetometer, and orientation are all optional, so use only values present in a sample. `source` distinguishes glasses, Neural Band, and unknown sources.

The sample stream buffers the newest 256 samples. Keep processing off the main actor when it is expensive.

Stop and remove

`motion.stop()` pauses streaming and the same capability can be started again. Cancel the sample task before calling `session.removeMotion()`; removal is terminal.

Test with MockDeviceKit

Configure deterministic replay before or during streaming with `glasses.services.motion.setMotionFeed(samples)` or a CSV file URL. Use `glasses.services.motion.isStreaming` only to assert mock behavior; app logic should observe the SDK Motion state.

Availability

Motion is experimental. Apps can use it for development and beta testing, but cannot publish it to production release channels yet.

Read more
@facebook
Ships withmeta-wearables-dat-ios

The Meta Wearables Device Access Toolkit enables developers to utilize Meta's AI glasses to build hands-free wearable experiences into their mobile applications.

Stars on GitHub

Momentum

stars in total
595
Star history of facebook/meta-wearables-dat-ios on GitHub, a chart by star-history.com

Other skills on meta-wearables-dat-ios.

More skills from other plugins.

deep-code-review

deep-code-review

In-depth design-focused code review - understands codebase context before evaluating PR changes, posts structured feedback to…

expo13d53k
@expo@expoInstall Skill
modlens

modlens

Plug-in vision for text-only models. Hard rule: when a file path or URL with an image extension (.png, .jpg, .jpeg, .webp, .gif,…

modlens4w4.6k
@liustack@liustackInstall Skill
appllama-app-design-skill

appllama-app-design-sk…

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile…

appllama2mo3.9k
@appllama@appllamaInstall Skill

Questions about motion.

Which coding agents can use motion?
motion installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.