facebook/meta-wearables-dat-ios/sample-app-guide
Claude Code and agent skill by facebook/meta-wearables-dat-ios
- community
Checking that the SKILL.md file is still in the repository.
Building a complete DAT app with camera streaming and photo capture
Install
npx vskill@latest install facebook/meta-wearables-dat-ios/sample-app-guideSKILL.md
The same SKILL.md was published earlier as facebook/meta-wearables-dat-ios/sample-app-guide.
Sample App Guide (iOS)
Build an iOS DAT app with camera streaming and photo capture.
This walkthrough covers app setup, registration, streaming, and capture. Pair it with the CameraAccess sample.
Project setup
- Create a new Xcode project (SwiftUI App)
- Add the SDK via SPM:
https://github.com/meta/meta-wearables-dat-ios - Add
MWDATCore,MWDATCamera, andMWDATMockDeviceto your target - Configure
Info.plistand add the Hotspot Configuration capability (see Getting Started)
App architecture
A typical DAT app has these components:
SDK initialization
Wearables ViewModel
devicesStream() yields [DeviceIdentifier] (a [String]), not device objects. Resolve each identifier with wearables.deviceForIdentifier(_:) when you need nameOrId(), deviceType(), linkState, or compatibility().
Stream ViewModel
Behaviors the CameraAccess sample also covers
- Two explicit steps. "Start Session" creates and starts the
DeviceSession; "Preview" adds theCameraand starts the stream. Stopping the preview leaves the session connected so the user can start it again without re-creating the session. - Bind the UI to the SDK's own states. Mirror
DeviceSessionStateandStreamStateinstead of maintaining a parallel state machine, and show a busy indicator whilestarting,waitingForDevice, orstopping. - Background handling. On
UIApplication.didEnterBackgroundNotification, end the session. Suppress the teardown errors that the SDK emits during that intentional stop so the user does not see a false failure on return. - Update prompts. Watch
device.compatibility()withdevice.addCompatibilityListener; on.deviceUpdateRequired, offerWearables.shared.openFirmwareUpdate(). When session start reportsDeviceSessionError.datAppOnTheGlassesUpdateRequired, offerWearables.shared.openDATGlassesAppUpdate(). - Single error surface. Present
error.localizedDescriptionfromsession.errorPublisherandstream.errorPublisherin one alert rather than an app-maintained error map.
Testing with MockDeviceKit
Add mock device support to develop without glasses:
Allowed dependencies
Your DAT app should only depend on:
MWDATCore— always requiredMWDATCamera— for camera streamingMWDATMockDevice— for testing (can be test-only dependency)MWDATDisplay— for Display experiences
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/sample-app-guide/SKILL.md
Popularity
- Repository stars
- 529
- Repository forks
- 119
- 7-day trend score
- 31
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/sample-app-guide)