facebook/meta-wearables-dat-ios/dat-conventions
Claude Code and agent skill by facebook/meta-wearables-dat-ios
- community
Checking that the SKILL.md file is still in the repository.
Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development
Install
npx vskill@latest install facebook/meta-wearables-dat-ios/dat-conventionsSKILL.md
The same SKILL.md was published earlier as facebook/meta-wearables-dat-ios/dat-conventions.
DAT SDK Conventions (iOS)
Architecture
The public SDK is organized into these modules:
- MWDATCore: Device discovery, registration, permissions, device selectors,
DeviceSession - MWDATCamera:
Camera,Stream,VideoFrame, photo capture - MWDATDisplay: Display capability, display UI components, icons, images, buttons, video
- MWDATMockDevice: MockDeviceKit for testing without hardware
- MWDATMockDeviceTestClient:
MockDeviceTestClientfor driving MockDeviceKit over HTTP from a UI-test process
Swift Patterns
- Use
async/awaitfor registration, permission, and URL-handling calls;createSession,DeviceSession.start(),addCamera, andStream.start()are synchronous - Use
AsyncSequence/ publisher.listen {}for observing streams - Annotate UI-updating code with
@MainActor - Never block the main thread with frame processing
- Handle errors with do/catch — the SDK throws typed errors
Naming Conventions
| Type | Convention | Example | |
|---|---|---|---|
| Entry point | Wearables.shared | Wearables.shared.startRegistration() | |
| Device sessions | *Session | DeviceSession | |
| Capabilities | Named by function | Stream | |
| Selectors | *DeviceSelector | AutoDeviceSelector, SpecificDeviceSelector | |
| Config | *Configuration | StreamConfiguration | |
| Publishers | *Publisher | statePublisher, videoFramePublisher |
Imports
For testing:
Key Types
Wearables— SDK entry point. CallWearables.configure()at launch, then useWearables.shared(anany WearablesInterface)DeviceSession— The connection to a selected device. Create withcreateSession(deviceSelector:), then attach capabilitiesCamera— Camera capability fromsession.addCamera(config:); ownscamera.streamStream— Camera stream:start(),stop(),capturePhoto(format:), and the frame/state/photo/error publishersDisplay— Display capability fromsession.addDisplay()VideoFrame— Individual video frame with.makeUIImage()and.sampleBufferDevice/DeviceIdentifier—DeviceIdentifieris aString; resolve aDevicewithdeviceForIdentifier(_:)AutoDeviceSelector— Selects the best available device, optionally filtered (filter: { $0.supportsDisplay() })SpecificDeviceSelector— Selects a specific device byDeviceIdentifierStreamConfiguration— Configure video codec, resolution, frame rateListenerTokenBag/AnyListenerToken— Keep.listen {}subscriptions alive; dropping a token cancels itMockDeviceKit— Factory for creating simulated devices in tests
Error Handling
Build and Test
For sample apps:
Development Workflow
- Add SDK via Swift Package Manager (SPM) in Xcode
- Import modules (
MWDATCore,MWDATCamera,MWDATDisplaywhen rendering Display content) - Configure at app launch:
try Wearables.configure() - Build with Xcode or
xcodebuild - Test with MockDeviceKit - no physical glasses required
- Debug using Xcode console for SDK logs
Live docs search
If your editor supports remote MCP servers, connect https://mcp.developer.meta.com/wearables and use search_dat_docs for current DAT setup, session lifecycle, camera streaming, MockDeviceKit, permissions, and exact API symbols. This public docs server does not require authentication; do not configure tokens, OAuth, or custom authorization headers for it.
See the dat-docs-mcp skill for Claude Code, Cursor, and MCP Inspector setup and troubleshooting.
Use llms.txt when your tool only supports static reference context.
Links
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/mwdat-ios/skills/dat-conventions/SKILL.md
Popularity
- Repository stars
- 555
- Repository forks
- 123
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/facebook/meta-wearables-dat-ios/dat-conventions)