Skip to content
Mobile
Skill

/display-access

Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback

From plugin
meta-wearables-dat-ios
58917 skills

Claude Code

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

SKILL.md

display-access.SKILL.md
name: display-access
description: Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback

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:

import MWDATCore
import MWDATDisplay

For a phone preview, add `MWDATMockDevice` alongside `MWDATDisplay`, enable `MockDeviceKit`, and pair a display-capable model:

import MWDATMockDevice

MockDeviceKit.shared.enable()
let mockDevice = try MockDeviceKit.shared.pairGlasses(model: .metaRayBanDisplay)
mockDevice.powerOn()
mockDevice.don()

// Render what the glasses would show, inside your app
let previewView = mockDevice.services.display.createPreviewView()

`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 `CFBundleURLTypes` URL scheme and route callbacks to `Wearables.shared.handleUrl(_:)`.
  • Under `MWDAT`, set `AppLinkURLScheme`, `MetaAppID`, `ClientToken`, and `TeamID`. An empty, `0`, or unexpanded `$(META_APP_ID)` value keeps the SDK in Developer Mode; production apps should use Wearables Developer Center values for `MetaAppID` and `ClientToken`, plus the Apple Developer Team ID.
  • Set `UIBackgroundModes` to `processing`, `bluetooth-central`, and `bluetooth-peripheral`, and add a non-empty `NSBluetoothAlwaysUsageDescription`, 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 out `NSLocalNetworkUsageDescription`, `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:

let wearables = Wearables.shared
let deviceSelector = AutoDeviceSelector(
  wearables: wearables,
  filter: { device in device.supportsDisplay() }
)

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.

import MWDATCore
import MWDATDisplay

@MainActor
final class DisplayController {
  private var deviceSession: DeviceSession?
  private var display: Display?
  private var displayStateToken: AnyListenerToken?
  private var sessionErrorTask: Task<Void, Never>?

  func connect() async {
    do {
      let wearables = Wearables.shared
      let selector = AutoDeviceSelector(
        wearables: wearables,
        filter: { $0.supportsDisplay() }
      )

      let session = try wearables.createSession(deviceSelector: selector)
      deviceSession = session
      sessionErrorTask = Task { [weak self] in
        for await error in session.errorStream() {
          await self?.showError(error.localizedDescription)
        }
      }

      let states = session.stateStream()
      let sessionStarted = Task {
        for await state in states {
          if state == .started {
            return
          }
        }
      }
      do {
        try session.start()
        await sessionStarted.value
      } catch {
        sessionStarted.cancel()
        throw error
      }

      let capability = try session.addDisplay()
      display = capability
      displayStateToken = capability.statePublisher.listen { [weak self] state in
        Task { @MainActor in
          if state == .started {
            self?.showStatusCard()
          }
        }
      }

      capability.start()
    } catch DeviceSessionError.datAppOnTheGlassesUpdateRequired {
      showDATGlassesAppUpdate()
    } catch {
      showError(error.localizedDescription)
    }
  }

  func disconnect() async {
    display?.onPlaybackEvent = nil
    display?.stop()
    deviceSession?.stop()
    sessionErrorTask?.cancel()
    sessionErrorTask = nil
    displayStateToken = nil
    display = nil
    deviceSession = nil
  }
}

For user-triggered content, match the sample's pending-action pattern: if the user taps "

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
589
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…

expo10d53k
@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 display-access.

Which coding agents can use display-access?
display-access 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.