facebook/meta-wearables-dat-ios/display-access
Claude Code and agent skill by facebook/meta-wearables-dat-ios
- community
Checking that the SKILL.md file is still in the repository.
Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback
Install
npx vskill@latest install facebook/meta-wearables-dat-ios/display-accessSKILL.md
The same SKILL.md was published earlier as facebook/meta-wearables-dat-ios/display-access.
Display Access (iOS)
Use MWDATDisplay to render content on Meta Ray-Ban Display glasses.
Use this skill with getting-started and permissions-registration when creating a full app. A Display app still needs Wearables.configure() at launch, Info.plist URL scheme configuration, URL callbacks through Wearables.shared.handleUrl(_:), and completed Meta AI registration before it can create a session.
Add the Display module
Add MWDATDisplay to the same app target that already uses MWDATCore. Import it next to core:
For a phone preview, add MWDATMockDevice alongside MWDATDisplay, enable MockDeviceKit, and pair a display-capable model:
MockDisplayKit also exposes sendClick(identifier:) so tests can simulate taps.
Use the normal DeviceSession.addDisplay() API for both physical and mock devices. Wait until deviceForIdentifier(_:) reports linkState == .connected and compatibility() == .compatible before creating the session.
Display-specific app configuration
Use the getting-started Info.plist setup, then mirror the DisplayAccess sample for Display sessions:
- Keep the
CFBundleURLTypesURL scheme and route callbacks toWearables.shared.handleUrl(_:). - Under
MWDAT, setAppLinkURLScheme,MetaAppID,ClientToken, andTeamID. An empty,0, or unexpanded$(META_APP_ID)value keeps the SDK in Developer Mode; production apps should use Wearables Developer Center values forMetaAppIDandClientToken, plus the Apple Developer Team ID. - Set
UIBackgroundModestoprocessing,bluetooth-central, andbluetooth-peripheral, and add a non-emptyNSBluetoothAlwaysUsageDescription, as the DisplayAccess sample does. - Display sends its content over the session's Bluetooth LE connection; for
VideoPlayer(provider: .uri(...)), the SDK sends only the URL and the glasses download the video. If the app does not stream the camera, it can leave outNSLocalNetworkUsageDescription,NSBonjourServices, and the Hotspot Configuration capability. DisplayAccess declares the two entries, but Display does not use them.
Select a display-capable device
Use the public display filter when creating an automatic selector:
Use SpecificDeviceSelector(device: selectedDevice.identifier) instead when your UI lets the user pick a specific Device. The initializer takes a DeviceIdentifier, not the whole Device.
AutoDeviceSelector updates from devicesStream(). Create it before the user taps the Display action, or wait for activeDeviceStream() to yield a non-nil device before calling createSession(deviceSelector:); otherwise createSession can throw DeviceSessionError.noEligibleDevice.
For a picker or Settings screen, list devices from Wearables.shared.devicesStream(), then look up metadata from deviceForIdentifier(_:). The DisplayAccess sample shows nameOrId(), deviceType().rawValue, linkState, and compatibility() and keeps addLinkStateListener / addCompatibilityListener tokens alive while rows are visible. If compatibility() == .deviceUpdateRequired, surface a firmware update action through Wearables.shared.openFirmwareUpdate().
Attach Display after the session starts
Create and start the DeviceSession, wait for .started, then add and start Display. Keep the state listener token alive for as long as you need updates, and observe session.errorStream() for async session failures.
For user-triggered content, match the sample's pending-action pattern: if the user taps "Try it" before Display is connected, store the send as a pending async action, attach to Display, and run the action when DisplayState.started arrives. Reset the display session when registration changes to .available or .unavailable.
Send display UI
Build exactly one root DisplayableView per send(_:) call. Each send replaces the previous content on the glasses and replaces the active tap handlers. Use a root FlexBox for UI, or a root VideoPlayer for video. Do not send Text, Button, Image, or Icon as the root; place them inside a FlexBox.
If a file also imports SwiftUI, Display DSL names such as Text, Button, and Image can be ambiguous. Prefer keeping Display builders in files that import MWDATDisplay without SwiftUI, or qualify the symbols as MWDATDisplay.Text, MWDATDisplay.Button, and MWDATDisplay.Image.
Group buttons and control layout
Wrap multiple buttons in a ButtonGroup rather than adding them directly to a FlexBox. Mark the default action with .actionRole(.primary). FlexBox, Text, Button, ButtonGroup, Image, and Icon all support .flexGrow(_:), .flexShrink(_:), and .alignSelf(_:); FlexBox also supports .padding(_:), .background(_:), and .onTap(_:).
FlexBox also accepts wrap: true and padding: EdgeInsets(...) in its initializer, and its @ComponentBuilder content supports for loops and if conditions.
Use images and built-in icons
Use HTTPS image URLs for remote images, or Image(image:) for a bundled UIImage. Use the IconName enum for built-in icons; do not invent raw icon strings. ButtonStyle is .primary, .secondary, or .outline; IconStyle is .filled or .outline.
Send video
For URL-based video, send a root VideoPlayer. Use VideoPlayer(onError:) for video-specific errors, and use display.onPlaybackEvent for playback events. Set onPlaybackEvent before sending the video, clear it after terminal events if the flow is complete, and call sendVideoStop() if the user exits playback early. Blank or non-HTTP(S) URLs throw DisplayError.invalidVideoURL.
Display rules
- Call
Wearables.configure()at app launch and complete registration before creating the session. - Declare the
bluetooth-centralbackground mode and a non-emptyNSBluetoothAlwaysUsageDescriptionwhen building a full Display app; Display needs no Wi-Fi entries or Hotspot Configuration capability. - Wait for the
DeviceSessionto reach.startedbefore callingaddDisplay(). - Handle
DeviceSessionError.datAppOnTheGlassesUpdateRequiredseparately and offerWearables.shared.openDATGlassesAppUpdate(). - Call
display.start(), then wait forDisplayState.startedthroughstatePublisherbefore sending user-triggered content. - Observe
session.errorStream()so async session failures are surfaced. - Keep listener tokens alive; dropping a token stops that listener.
- Use the getting-started setup for Info.plist URL schemes and route app-open URLs to
Wearables.shared.handleUrl(_:). - Use
nameOrId(),deviceType(),linkState, andcompatibility()for device rows; keep link/compatibility listener tokens until the row is gone. - Use
FlexBox.onTapandButton(label:onClick:)for interactions. The callbacks belong to the most recent sent view. - Use only public Display DSL names:
FlexBox,Text,Button,ButtonGroup,Image,Icon,VideoPlayer,IconName,IconStyle,TextStyle,TextColor,ButtonStyle,ButtonGroupAlignment,ActionRole,ImageSize,CornerRadius,Direction,Alignment,Background,Edge, andEdgeInsets. - Call
display.clearDisplay()when you want to remove content without stopping Display. - Clear
display.onPlaybackEventwhen the video flow is finished if you no longer need playback callbacks. - Stop Display before stopping the parent
DeviceSessionwhen the display experience ends.
Sample app
Use the Display Access sample app for a complete flow: registration, device selection, display attachment, interactive content, and video.
Links
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/mwdat-ios/skills/display-access/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/display-access)