원클릭으로
dat-conventions
Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | dat-conventions |
| description | Swift patterns, async/await, naming conventions, key types for DAT SDK iOS development |
The SDK is organized into four modules:
async/await for all SDK operations — the SDK is fully asyncAsyncSequence / publisher .listen {} for observing streams@MainActor| Type | Convention | Example |
|---|---|---|
| Entry point | Wearables.shared | Wearables.shared.startRegistration() |
| Device sessions | *Session | DeviceSession |
| Capabilities | Named by function | Stream |
| Selectors | *DeviceSelector | AutoDeviceSelector, SpecificDeviceSelector |
| Config | *Configuration | StreamConfiguration |
| Publishers | *Publisher | statePublisher, videoFramePublisher |
import MWDATCore // Registration, devices, permissions
import MWDATCamera // Stream, VideoFrame, photo capture
import MWDATDisplay // Display, FlexBox, Text, Button, Image, Icon, VideoPlayer
For testing:
import MWDATMockDevice // MockDeviceKit, MockGlasses, MockCameraKit
Wearables — SDK entry point. Call Wearables.configure() at launch, then use Wearables.sharedStream — Camera streaming session. Create with config + device selectorDisplay — Display capability attached to a started DeviceSessionVideoFrame — Individual video frame with .makeUIImage() convenienceAutoDeviceSelector — Automatically selects the best available deviceSpecificDeviceSelector — Selects a specific device by identifierStreamConfiguration — Configure video codec, resolution, frame rateMockDeviceKit — Factory for creating simulated devices in testsdo {
try Wearables.configure()
} catch {
// Handle configuration error
}
do {
try await Wearables.shared.startRegistration()
} catch {
// Handle registration error
}
# Install dependencies via Swift Package Manager
# In Xcode: File > Add Package Dependencies > enter repo URL
# Build from command line
xcodebuild -scheme MWDATCore -destination 'platform=iOS Simulator,name=iPhone 16'
# Run tests
xcodebuild test -scheme MWDATCoreTests -destination 'platform=iOS Simulator,name=iPhone 16'
For sample apps:
# Open the sample app workspace
open ExternalSampleApps/CameraAccess/CameraAccess.xcodeproj
# Build and run on simulator (uses MockDeviceKit - no glasses needed)
xcodebuild -scheme CameraAccess -destination 'platform=iOS Simulator,name=iPhone 16'
MWDATCore, MWDATCamera, MWDATDisplay when rendering Display content)try Wearables.configure()xcodebuildIf your editor supports remote MCP servers, connect https://mcp.developer.meta.com/wearables and use search_dat_docs for current DAT setup, session lifecycle, camera streaming, MockDeviceKit, permissions, and exact API symbols. This public docs server does not require authentication; do not configure tokens, OAuth, or custom authorization headers for it.
Use llms.txt when your tool only supports static reference context.
Stream, video frames, photo capture, resolution/frame rate configuration
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
Common issues, Developer Mode, version compatibility, state machine diagnosis