audio-streaming
Receive synchronized PCM audio frames through a Camera stream on iOS
Stream accelerometer, gyroscope, magnetometer, and orientation samples from connected wearables on iOS
$ npx -y skills add facebook/meta-wearables-dat-ios --skill motion --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/motionContext preview
The summary Claude sees to decide when to auto-load this skill.
Stream accelerometer, gyroscope, magnetometer, and orientation samples from connected wearables on iOS
name: motion description: Stream accelerometer, gyroscope, magnetometer, and orientation samples from connected wearables on 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.
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.
`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.
`motion.stop()` pauses streaming and the same capability can be started again. Cancel the sample task before calling `session.removeMotion()`; removal is terminal.
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.
Motion is experimental. Apps can use it for development and beta testing, but cannot publish it to production release channels yet.
The Meta Wearables Device Access Toolkit enables developers to utilize Meta's AI glasses to build hands-free wearable experiences into their mobile applications.
Receive synchronized PCM audio frames through a Camera stream on iOS
Capture standalone high-quality photos from connected glasses on iOS
Stream, video frames, photo capture, resolution/frame rate configuration
Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development
Use the Wearables DAT MCP server for live DAT documentation search with `search_dat_docs`,…