
Description
App registration with Meta AI, camera permission flows
SKILL.md
Permissions & Registration (iOS)
Register your app with Meta AI, then request the device permissions it needs.
The DAT SDK separates two concepts:
- Registration — Your app registers with Meta AI to become a permitted integration
- 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
| 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.
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 the meta-wearables-dat-ios repository
View all 9 skillscamera-streaming
configure camera streaming and photo capture
May 15CameraHardwareiOSVideodat-conventions
develop iOS applications with DAT SDK
May 15iOSMobileSDKSwiftdebugging
debug wearable device software
May 15DebuggingEngineeringiOSdisplay-access
manage display capabilities on wearable devices
May 15DesignImagesInteractionUI Components +1getting-started
set up Meta wearable SDK integration
May 15ConfigurationiOSSDKSwiftmockdevice-testing
test wearable apps with mock devices
May 15iOSMobileQATesting
More from Meta Open Source
View publisherrelay-best-practices
write idiomatic Relay code
relay
Apr 22EngineeringFrontendGraphQLReact +1relay-performance
optimize Relay application performance
relay
Jun 10FrontendGraphQLPerformanceReact +1add-shape-types-to-torch-model
annotate PyTorch models with tensor shapes
pyrefly
Jul 18Data ModelingDeep LearningPythonPyTorchsample-app-guide
build wearable apps with camera streaming
meta-wearables-dat-ios
May 15CameraiOSMobilesession-lifecycle
monitor device session lifecycle states
meta-wearables-dat-ios
May 15iOSMobileMonitoringPerformance