
Getting Started
- 5 installs
- 500 repo stars
- Updated August 3, 2026
- facebook/meta-wearables-dat-ios
Sets up the Meta Wearables DAT SDK in an iOS app via Swift Package Manager, Info.plist configuration, and first connection to Meta glasses.
About
Walks through initial DAT SDK setup on iOS: adding the SDK via Swift Package Manager, configuring Info.plist, and making a first device connection. iOS developers use it to bootstrap a new Meta Wearables integration.
- Swift Package Manager integration steps
- Requires Xcode 15+, iOS 16+, Meta AI app, Developer Mode
Getting Started by the numbers
- 5 all-time installs (skills.sh)
- Ranked #828 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/facebook/meta-wearables-dat-ios --skill getting-startedAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5 |
|---|---|
| repo stars | ★ 500 |
| Last updated | August 3, 2026 |
| Repository | facebook/meta-wearables-dat-ios ↗ |
What it does
Sets up the Meta Wearables DAT SDK in an iOS app via Swift Package Manager, Info.plist configuration, and first connection to Meta glasses.
Files
Getting Started with DAT SDK (iOS)
Set up the Meta Wearables Device Access Toolkit in an iOS app.
Prerequisites
- Xcode 15.0+, iOS 16.0+ deployment target
- Meta AI companion app installed on test device
- Ray-Ban Meta glasses or Meta Ray-Ban Display glasses (or use MockDeviceKit for development)
- Developer Mode enabled in Meta AI app (Settings > Your glasses > Developer Mode)
Step 1: Add the SDK via Swift Package Manager
1. In Xcode, select File > Add Package Dependencies... 2. Enter https://github.com/facebook/meta-wearables-dat-ios 3. Select a version 4. Add MWDATCore and MWDATCamera to your target
Step 2: Configure Info.plist
Add these required entries to your Info.plist:
<!-- URL scheme for Meta AI callbacks -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myexampleapp</string>
</array>
</dict>
</array>
<!-- Allow the Meta AI companion app to callback -->
<!-- Add fb-viewapp to your app's Info.plist query-schemes allowlist. -->
<!-- External accessory protocol -->
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.meta.ar.wearable</string>
</array>
<!-- Background modes -->
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-peripheral</string>
<string>external-accessory</string>
</array>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Needed to connect to Meta Wearables</string>
<!-- DAT configuration -->
<key>MWDAT</key>
<dict>
<key>AppLinkURLScheme</key>
<string>myexampleapp://</string>
<key>MetaAppID</key>
<string>0</string>
</dict>Replace myexampleapp with your app's URL scheme. Use 0 for MetaAppID during development with Developer Mode, and add fb-viewapp to your app's Info.plist query-schemes allowlist.
Step 3: Initialize the SDK
Call Wearables.configure() once at app launch:
import MWDATCore
@main
struct MyApp: App {
init() {
do {
try Wearables.configure()
} catch {
assertionFailure("Failed to configure Wearables SDK: \(error)")
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}Step 4: Handle URL callbacks
Your app must handle the URL callback from Meta AI after registration:
.onOpenURL { url in
Task {
_ = try? await Wearables.shared.handleUrl(url)
}
}Step 5: Register with Meta AI
func startRegistration() async throws {
try await Wearables.shared.startRegistration()
}Observe registration state:
Task {
for await state in Wearables.shared.registrationStateStream() {
// Update UI based on registration state
}
}Step 6: Start streaming
import MWDATCore
import MWDATCamera
// Create a DeviceSession — device selection is configured here
let wearables = Wearables.shared
let deviceSelector = AutoDeviceSelector(wearables: wearables)
let deviceSession = try wearables.createSession(deviceSelector: deviceSelector)
try deviceSession.start()
// Wait for the device session to reach the started state
for await state in deviceSession.stateStream() {
if state == .started { break }
}
let config = StreamConfiguration(
videoCodec: .raw,
resolution: .low,
frameRate: 24
)
guard let stream = try deviceSession.addStream(config: config) else {
return
}
// Observe frames
let frameToken = stream.videoFramePublisher.listen { frame in
guard let image = frame.makeUIImage() else { return }
Task { @MainActor in
self.currentFrame = image
}
}
// Start the stream capability
Task { await stream.start() }Next steps
- Camera Streaming — Resolution, frame rate, photo capture
- MockDevice Testing — Test without hardware
- Session Lifecycle — Handle pause/resume/stop
- Permissions — Camera permission flows
- Full documentation