permissions-registration

App registration with Meta AI, camera permission flows

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

Permissions & Registration (iOS)

Register your app with Meta AI, then request the device permissions it needs.

The DAT SDK separates two concepts:

  1. Registration — Your app registers with Meta AI to become a permitted integration
  2. Device permissions — After registration, request specific device permissions (e.g., camera)

All permission grants occur through the Meta AI companion app.

Registration flow

Start registration

func startRegistration() async throws {
    try await Wearables.shared.startRegistration()
}

This opens the Meta AI app where the user approves your app. Meta AI then calls back via your URL scheme.

Handle the callback

.onOpenURL { url in
    Task {
        _ = try? await Wearables.shared.handleUrl(url)
    }
}

Observe registration state

Task {
    for await state in Wearables.shared.registrationStateStream() {
        switch state {
        case .registered:
            // App is registered, can request permissions
        case .unavailable:
            // Registration is unavailable
        case .available:
            // Ready to register
        case .registering:
            // Registration in progress
        }
    }
}

Unregister

func startUnregistration() async throws {
    try await Wearables.shared.startUnregistration()
}

Camera permissions

Check permission status

let status = try await Wearables.shared.checkPermissionStatus(.camera)

Request permission

let status = try await Wearables.shared.requestPermission(.camera)

The SDK opens Meta AI for the user to grant access. Users can choose:

  • Allow once — temporary, single-session grant
  • Allow always — persistent grant

Multi-device behavior

Users can link multiple glasses to Meta AI. The SDK handles this transparently:

  • Permission granted on any linked device means your app has access
  • You don't need to track which device has permissions
  • If all devices disconnect, permissions become unavailable

Developer Mode vs Production

ModeRegistration behavior
Developer ModeRegistration always allowed (use MetaAppID = 0)
ProductionUsers must be in proper release channel

For production, get your APPLICATION_ID from the Wearables Developer Center.

Prerequisites

  • Registration requires an internet connection
  • Meta AI companion app must be installed
  • For Developer Mode: enable in Meta AI > Settings > Your glasses > Developer Mode

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