Skip to content
Mobile
Skill

/permissions-registration

App registration with Meta AI, camera permission flows

From plugin
meta-wearables-dat-ios
58917 skills

Claude Code

$ npx -y skills add meta/meta-wearables-dat-ios --skill permissions-registration --agent claude-code

SKILL.md

permissions-registration.SKILL.md
name: permissions-registration
description: App registration with Meta AI, camera permission flows

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

Filter on the `metaWearablesAction` query item so unrelated deep links are not forwarded to the SDK:

.onOpenURL { url in
    guard
        let components = URLComponents(url: url, resolvingAgainstBaseURL: false),
        components.queryItems?.contains(where: { $0.name == "metaWearablesAction" }) == true
    else {
        return
    }
    Task {
        do {
            _ = try await Wearables.shared.handleUrl(url)
        } catch let error as WearablesHandleURLError {
            showError(error.description)
        } catch {
            showError(error.localizedDescription)
        }
    }
}

Observe registration state

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

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

Typed errors

Registration and permission APIs use typed throws. Prefer `error.description` or `error.localizedDescription` over your own error strings:

  • `startRegistration()` throws `RegistrationError`: `.alreadyRegistered`, `.configurationInvalid`, `.metaAINotInstalled`, `.networkUnavailable`, `.unknown`
  • `startUnregistration()` throws `UnregistrationError`: `.alreadyUnregistered`, `.configurationInvalid`, `.metaAINotInstalled`, `.unknown`
  • `handleUrl(_:)` throws `WearablesHandleURLError`: `.registrationError`, `.unregistrationError`
  • `checkPermissionStatus(_:)` and `requestPermission(_:)` throw `PermissionError`: `.noDevice`, `.noDeviceWithConnection`, `.connectionError`, `.metaAINotInstalled`, `.requestInProgress`, `.requestTimeout`, `.internalError`
  • `openFirmwareUpdate()` and `openDATGlassesAppUpdate()` throw `NavigationError`: `.metaAINotInstalled`, `.notRegistered`

Update flows

When a device reports `compatibility() == .deviceUpdateRequired`, offer a firmware update. When session start reports `DeviceSessionError.datAppOnTheGlassesUpdateRequired`, offer the glasses app update. Both open Meta AI:

try await Wearables.shared.openFirmwareUpdate()
try await Wearables.shared.openDATGlassesAppUpdate()

Developer Mode vs Production

| Mode | Registration behavior | |------|----------------------| | Developer Mode | Registration always allowed. `MetaAppID` is empty, `0`, or an unexpanded `$(META_APP_ID)` placeholder, so the SDK skips attestation | | Production | `MetaAppID`, `ClientToken`, and `TeamID` must all be set, and users must be in the proper release channel |

For production, get your app ID and client token from the [Wearables Developer Center](https://wearables.developer.meta.com/), and use your Apple Developer Team ID for `TeamID`.

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

  • [Permissions documentation](https://wearables.developer.meta.com/docs/permissions-requests)
  • [Getting started guide](https://wearables.developer.meta.com/docs/getting-started-toolkit)
  • [Manage projects](https://wearables.developer.meta.com/docs/manage-projects)
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…

expo12d53k
@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 permissions-registration.

Which coding agents can use permissions-registration?
permissions-registration 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.