一键导入
permissions-registration
App registration with Meta AI, camera permission flows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
App registration with Meta AI, camera permission flows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Stream, video frames, photo capture, resolution/frame rate configuration
Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development
Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback
SDK setup, Swift Package Manager integration, Info.plist configuration, and first connection to Meta glasses
MockDeviceKit for testing without physical glasses hardware
Building a complete DAT app with camera streaming and photo capture
| name | permissions-registration |
| description | App registration with Meta AI, camera permission flows |
Register your app with Meta AI, then request the device permissions it needs.
The DAT SDK separates two concepts:
All permission grants occur through the Meta AI companion app.
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.
.onOpenURL { url in
Task {
_ = try? await Wearables.shared.handleUrl(url)
}
}
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
}
}
}
func startUnregistration() async throws {
try await Wearables.shared.startUnregistration()
}
let status = try await Wearables.shared.checkPermissionStatus(.camera)
let status = try await Wearables.shared.requestPermission(.camera)
The SDK opens Meta AI for the user to grant access. Users can choose:
Users can link multiple glasses to Meta AI. The SDK handles this transparently:
| Mode | Registration behavior |
|---|---|
| Developer Mode | Registration always allowed (use MetaAppID = 0) |
| Production | Users must be in proper release channel |
For production, get your APPLICATION_ID from the Wearables Developer Center.