debugging

Common issues, Developer Mode, version compatibility, state machine diagnosis

npx skills add https://github.com/facebook/meta-wearables-dat-ios --skill debugging

Debugging (iOS)

Diagnose common setup, registration, and streaming issues in DAT SDK integrations.

Quick diagnosis

Device not connecting?
│
├── Is Developer Mode enabled? → Enable in Meta AI app settings
│
├── Is device registered? → Check registration state
│
├── Is device in range? → Bluetooth on, glasses powered on
│
├── Is the app registered? → Check registrationStateStream()
│
└── Stream stuck in waitingForDevice? → Check device availability

Developer Mode

Developer Mode must be enabled for 3P apps to access device features.

Enabling Developer Mode

  1. Open Meta AI app on phone
  2. Go to Settings → (Your connected glasses)
  3. Find "Developer Mode" toggle
  4. Toggle ON
  5. Device may restart

Symptoms of Developer Mode disabled

  • Registration completes but device never connects
  • Stream stuck in waitingForDevice
  • Permission requests fail or never appear

Watch for

  • Developer Mode toggles off after firmware updates — re-enable it
  • Developer Mode is per-device — enable for each glasses pair
  • Some features need additional permissions beyond Developer Mode

Stream state issues

Expected flow

stopped → waitingForDevice → starting → streaming → stopped

Stuck in waitingForDevice

  • Device not in range or not connected
  • Device not reporting availability
  • DeviceSelector not matching any device

Unexpected stop

  • Device disconnected (out of range, battery died)
  • Channel closed by device
  • Error in frame processing

Version compatibility

Ensure compatible versions of SDK, Meta AI app, and glasses firmware. See version dependencies for the current compatibility matrix.

Known issues

IssueWorkaround
No internet → registration failsInternet required for registration
Streams started with glasses doffed pause when donnedUnpause by tapping side of glasses
[iOS] Meta Ray-Ban Display: no audio feedback on pause/resumeWill be fixed in future release

Adding debug logging

import os

private let logger = Logger(subsystem: "com.yourapp", category: "Wearables")

// In your streaming code:
logger.debug("Stream state changed to: \(state)")
logger.error("Stream error: \(error)")

Checklist

  • Developer Mode enabled in Meta AI app
  • Meta AI app updated to compatible version
  • Glasses firmware updated to compatible version
  • Internet connection available for registration
  • Bluetooth enabled on phone
  • Correct URL scheme configured in Info.plist
  • Background modes enabled (bluetooth-peripheral, external-accessory)

Links

More skills from facebook

binary-size-analysis
facebook
Analyze per-commit binary size changes of the hermesvm shared library across a git commit range. Produces a markdown report with per-commit sizes and summary tables of significant increases and decreases.
official
modify-jsi-features
facebook
Guide for adding new JSI functionality to the JavaScript Interface (JSI) layer. Use when the user asks to add, create, or implement new methods or features in…
official
non-interactive-git-rebase
facebook
Use when needing to reorder, split, drop, or amend git commits that are not the top commit, without interactive editor access. Covers programmatic rebase via…
official
click-target
facebook
Find and click a target object in XR. Use when testing UI interactions, clicking buttons, or verifying interactable elements work correctly.
official
iwsdk-planner
facebook
IWSDK project planning and best practices guide. Use when planning new IWSDK features, designing systems/components, reviewing IWSDK code architecture, or when…
official
iwsdk-ui-panel
facebook
Develop and iterate on IWSDK UI panels efficiently. Use when working on PanelUI components, debugging UI layout, or improving UI design in IWSDK applications.
official
test-all
facebook
Parallel test orchestrator. Runs all 9 test suites concurrently via Task sub-agents and the iwsdk CLI. Handles build, example setup, dev servers, agent launch,…
official
test-audio
facebook
Test audio system (AudioSource loading, playback state, stop, spatial audio) against the audio example using the iwsdk CLI.
official