[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-meta-session-lifecycle":3,"mdc-tuawew-key":37,"related-repo-meta-session-lifecycle":856,"related-org-meta-session-lifecycle":962},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"session-lifecycle","monitor device session lifecycle states","Device session states, pause\u002Fresume, availability monitoring",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"meta","Meta Open Source","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmeta.png","facebook",[13,17,20,23],{"name":14,"slug":15,"type":16},"Performance","performance","tag",{"name":18,"slug":19,"type":16},"Monitoring","monitoring",{"name":21,"slug":22,"type":16},"iOS","ios",{"name":24,"slug":25,"type":16},"Mobile","mobile",488,"https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fmeta-wearables-dat-ios","2026-05-15T06:14:44.790925",null,112,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Meta Wearables Device Access Toolkit for iOS","https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fmeta-wearables-dat-ios\u002Ftree\u002FHEAD\u002Fplugins\u002Fmwdat-ios\u002Fskills\u002Fsession-lifecycle","---\nname: session-lifecycle\ndescription: Device session states, pause\u002Fresume, availability monitoring\n---\n\n# Session Lifecycle (iOS)\n\nGuide for managing device session states in DAT SDK integrations.\n\n## Overview\n\nThe DAT SDK runs work inside sessions. Meta glasses expose two experience types:\n- **Device sessions** — sustained access to device sensors and outputs\n- **Transactions** — short, system-owned interactions (notifications, \"Hey Meta\")\n\nYour app observes session state changes — the device decides when to transition.\n\n## Session states\n\n| State | Meaning | App action |\n|-------|---------|------------|\n| `idle` | Session created but not started | Call `start()` when ready |\n| `starting` | Session is connecting to the device | Show connecting state |\n| `started` | Session active and ready for capabilities | Add or resume work |\n| `paused` | Temporarily suspended by the device | Hold work, may resume |\n| `stopping` | Session is cleaning up | Wait for terminal state |\n| `stopped` | Session inactive and terminal | Free resources, create a new session to restart |\n\n## Observing session state\n\n```swift\nlet session = try Wearables.shared.createSession(deviceSelector: AutoDeviceSelector(wearables: Wearables.shared))\ntry session.start()\n\nTask {\n    for await state in session.stateStream() {\n        switch state {\n        case .started:\n            \u002F\u002F Confirm UI shows session is live\n        case .paused:\n            \u002F\u002F Keep connection, wait for started or stopped\n        case .stopped:\n            \u002F\u002F Release resources, allow user to restart\n        default:\n            break\n        }\n    }\n}\n```\n\n## Stream state transitions\n\nA `Stream` is a capability attached to a started `DeviceSession`:\n\n```text\nstopped → waitingForDevice → starting → streaming → paused → stopped\n```\n\n```swift\nguard let stream = try session.addStream(config: StreamConfiguration()) else { return }\n\nlet token = stream.statePublisher.listen { state in\n    Task { @MainActor in\n        \u002F\u002F React to state changes\n    }\n}\n```\n\n## Common transitions\n\nThe device changes session state when:\n- User performs a system gesture that opens another experience\n- Another app starts a device session\n- User removes or folds the glasses (Bluetooth disconnects)\n- User removes the app from Meta AI companion app\n- Connectivity between companion app and glasses drops\n\n## Pause and resume\n\nWhen a session is paused:\n- The device keeps the connection alive\n- Streams stop delivering data\n- The device may resume by returning to `started`\n\nYour app should **not** attempt to restart while paused — wait for `started` or `stopped`.\n\n## Device availability\n\nMonitor device availability to know when sessions can start:\n\n```swift\nTask {\n    for await devices in Wearables.shared.devicesStream() {\n        \u002F\u002F Update list of available glasses\n    }\n}\n```\n\nKey behaviors:\n- Closing hinges disconnects Bluetooth → forces `stopped`\n- Opening hinges restores Bluetooth but does **not** restart sessions\n- Start a new session after the device becomes available again\n\n## Implementation checklist\n\n- [ ] Handle all relevant session states (`started`, `paused`, `stopped`)\n- [ ] Monitor device availability before starting work\n- [ ] Release resources only after `stopped`\n- [ ] Don't infer transition causes — rely only on observable state\n- [ ] Don't restart during `paused` — wait for system to resume or stop\n\n## Links\n\n- [Session lifecycle documentation](https:\u002F\u002Fwearables.developer.meta.com\u002Fdocs\u002Flifecycle-events)\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,51,57,64,69,95,100,106,280,286,453,459,480,490,550,556,561,589,595,600,623,649,655,660,704,709,738,744,829,835,850],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"session-lifecycle-ios",[48],{"type":49,"value":50},"text","Session Lifecycle (iOS)",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55],{"type":49,"value":56},"Guide for managing device session states in DAT SDK integrations.",{"type":43,"tag":58,"props":59,"children":61},"h2",{"id":60},"overview",[62],{"type":49,"value":63},"Overview",{"type":43,"tag":52,"props":65,"children":66},{},[67],{"type":49,"value":68},"The DAT SDK runs work inside sessions. Meta glasses expose two experience types:",{"type":43,"tag":70,"props":71,"children":72},"ul",{},[73,85],{"type":43,"tag":74,"props":75,"children":76},"li",{},[77,83],{"type":43,"tag":78,"props":79,"children":80},"strong",{},[81],{"type":49,"value":82},"Device sessions",{"type":49,"value":84}," — sustained access to device sensors and outputs",{"type":43,"tag":74,"props":86,"children":87},{},[88,93],{"type":43,"tag":78,"props":89,"children":90},{},[91],{"type":49,"value":92},"Transactions",{"type":49,"value":94}," — short, system-owned interactions (notifications, \"Hey Meta\")",{"type":43,"tag":52,"props":96,"children":97},{},[98],{"type":49,"value":99},"Your app observes session state changes — the device decides when to transition.",{"type":43,"tag":58,"props":101,"children":103},{"id":102},"session-states",[104],{"type":49,"value":105},"Session states",{"type":43,"tag":107,"props":108,"children":109},"table",{},[110,134],{"type":43,"tag":111,"props":112,"children":113},"thead",{},[114],{"type":43,"tag":115,"props":116,"children":117},"tr",{},[118,124,129],{"type":43,"tag":119,"props":120,"children":121},"th",{},[122],{"type":49,"value":123},"State",{"type":43,"tag":119,"props":125,"children":126},{},[127],{"type":49,"value":128},"Meaning",{"type":43,"tag":119,"props":130,"children":131},{},[132],{"type":49,"value":133},"App action",{"type":43,"tag":135,"props":136,"children":137},"tbody",{},[138,170,192,214,236,258],{"type":43,"tag":115,"props":139,"children":140},{},[141,152,157],{"type":43,"tag":142,"props":143,"children":144},"td",{},[145],{"type":43,"tag":146,"props":147,"children":149},"code",{"className":148},[],[150],{"type":49,"value":151},"idle",{"type":43,"tag":142,"props":153,"children":154},{},[155],{"type":49,"value":156},"Session created but not started",{"type":43,"tag":142,"props":158,"children":159},{},[160,162,168],{"type":49,"value":161},"Call ",{"type":43,"tag":146,"props":163,"children":165},{"className":164},[],[166],{"type":49,"value":167},"start()",{"type":49,"value":169}," when ready",{"type":43,"tag":115,"props":171,"children":172},{},[173,182,187],{"type":43,"tag":142,"props":174,"children":175},{},[176],{"type":43,"tag":146,"props":177,"children":179},{"className":178},[],[180],{"type":49,"value":181},"starting",{"type":43,"tag":142,"props":183,"children":184},{},[185],{"type":49,"value":186},"Session is connecting to the device",{"type":43,"tag":142,"props":188,"children":189},{},[190],{"type":49,"value":191},"Show connecting state",{"type":43,"tag":115,"props":193,"children":194},{},[195,204,209],{"type":43,"tag":142,"props":196,"children":197},{},[198],{"type":43,"tag":146,"props":199,"children":201},{"className":200},[],[202],{"type":49,"value":203},"started",{"type":43,"tag":142,"props":205,"children":206},{},[207],{"type":49,"value":208},"Session active and ready for capabilities",{"type":43,"tag":142,"props":210,"children":211},{},[212],{"type":49,"value":213},"Add or resume work",{"type":43,"tag":115,"props":215,"children":216},{},[217,226,231],{"type":43,"tag":142,"props":218,"children":219},{},[220],{"type":43,"tag":146,"props":221,"children":223},{"className":222},[],[224],{"type":49,"value":225},"paused",{"type":43,"tag":142,"props":227,"children":228},{},[229],{"type":49,"value":230},"Temporarily suspended by the device",{"type":43,"tag":142,"props":232,"children":233},{},[234],{"type":49,"value":235},"Hold work, may resume",{"type":43,"tag":115,"props":237,"children":238},{},[239,248,253],{"type":43,"tag":142,"props":240,"children":241},{},[242],{"type":43,"tag":146,"props":243,"children":245},{"className":244},[],[246],{"type":49,"value":247},"stopping",{"type":43,"tag":142,"props":249,"children":250},{},[251],{"type":49,"value":252},"Session is cleaning up",{"type":43,"tag":142,"props":254,"children":255},{},[256],{"type":49,"value":257},"Wait for terminal state",{"type":43,"tag":115,"props":259,"children":260},{},[261,270,275],{"type":43,"tag":142,"props":262,"children":263},{},[264],{"type":43,"tag":146,"props":265,"children":267},{"className":266},[],[268],{"type":49,"value":269},"stopped",{"type":43,"tag":142,"props":271,"children":272},{},[273],{"type":49,"value":274},"Session inactive and terminal",{"type":43,"tag":142,"props":276,"children":277},{},[278],{"type":49,"value":279},"Free resources, create a new session to restart",{"type":43,"tag":58,"props":281,"children":283},{"id":282},"observing-session-state",[284],{"type":49,"value":285},"Observing session state",{"type":43,"tag":287,"props":288,"children":293},"pre",{"className":289,"code":290,"language":291,"meta":292,"style":292},"language-swift shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","let session = try Wearables.shared.createSession(deviceSelector: AutoDeviceSelector(wearables: Wearables.shared))\ntry session.start()\n\nTask {\n    for await state in session.stateStream() {\n        switch state {\n        case .started:\n            \u002F\u002F Confirm UI shows session is live\n        case .paused:\n            \u002F\u002F Keep connection, wait for started or stopped\n        case .stopped:\n            \u002F\u002F Release resources, allow user to restart\n        default:\n            break\n        }\n    }\n}\n","swift","",[294],{"type":43,"tag":146,"props":295,"children":296},{"__ignoreMap":292},[297,308,317,327,336,345,354,363,372,381,390,399,408,417,426,435,444],{"type":43,"tag":298,"props":299,"children":302},"span",{"class":300,"line":301},"line",1,[303],{"type":43,"tag":298,"props":304,"children":305},{},[306],{"type":49,"value":307},"let session = try Wearables.shared.createSession(deviceSelector: AutoDeviceSelector(wearables: Wearables.shared))\n",{"type":43,"tag":298,"props":309,"children":311},{"class":300,"line":310},2,[312],{"type":43,"tag":298,"props":313,"children":314},{},[315],{"type":49,"value":316},"try session.start()\n",{"type":43,"tag":298,"props":318,"children":320},{"class":300,"line":319},3,[321],{"type":43,"tag":298,"props":322,"children":324},{"emptyLinePlaceholder":323},true,[325],{"type":49,"value":326},"\n",{"type":43,"tag":298,"props":328,"children":330},{"class":300,"line":329},4,[331],{"type":43,"tag":298,"props":332,"children":333},{},[334],{"type":49,"value":335},"Task {\n",{"type":43,"tag":298,"props":337,"children":339},{"class":300,"line":338},5,[340],{"type":43,"tag":298,"props":341,"children":342},{},[343],{"type":49,"value":344},"    for await state in session.stateStream() {\n",{"type":43,"tag":298,"props":346,"children":348},{"class":300,"line":347},6,[349],{"type":43,"tag":298,"props":350,"children":351},{},[352],{"type":49,"value":353},"        switch state {\n",{"type":43,"tag":298,"props":355,"children":357},{"class":300,"line":356},7,[358],{"type":43,"tag":298,"props":359,"children":360},{},[361],{"type":49,"value":362},"        case .started:\n",{"type":43,"tag":298,"props":364,"children":366},{"class":300,"line":365},8,[367],{"type":43,"tag":298,"props":368,"children":369},{},[370],{"type":49,"value":371},"            \u002F\u002F Confirm UI shows session is live\n",{"type":43,"tag":298,"props":373,"children":375},{"class":300,"line":374},9,[376],{"type":43,"tag":298,"props":377,"children":378},{},[379],{"type":49,"value":380},"        case .paused:\n",{"type":43,"tag":298,"props":382,"children":384},{"class":300,"line":383},10,[385],{"type":43,"tag":298,"props":386,"children":387},{},[388],{"type":49,"value":389},"            \u002F\u002F Keep connection, wait for started or stopped\n",{"type":43,"tag":298,"props":391,"children":393},{"class":300,"line":392},11,[394],{"type":43,"tag":298,"props":395,"children":396},{},[397],{"type":49,"value":398},"        case .stopped:\n",{"type":43,"tag":298,"props":400,"children":402},{"class":300,"line":401},12,[403],{"type":43,"tag":298,"props":404,"children":405},{},[406],{"type":49,"value":407},"            \u002F\u002F Release resources, allow user to restart\n",{"type":43,"tag":298,"props":409,"children":411},{"class":300,"line":410},13,[412],{"type":43,"tag":298,"props":413,"children":414},{},[415],{"type":49,"value":416},"        default:\n",{"type":43,"tag":298,"props":418,"children":420},{"class":300,"line":419},14,[421],{"type":43,"tag":298,"props":422,"children":423},{},[424],{"type":49,"value":425},"            break\n",{"type":43,"tag":298,"props":427,"children":429},{"class":300,"line":428},15,[430],{"type":43,"tag":298,"props":431,"children":432},{},[433],{"type":49,"value":434},"        }\n",{"type":43,"tag":298,"props":436,"children":438},{"class":300,"line":437},16,[439],{"type":43,"tag":298,"props":440,"children":441},{},[442],{"type":49,"value":443},"    }\n",{"type":43,"tag":298,"props":445,"children":447},{"class":300,"line":446},17,[448],{"type":43,"tag":298,"props":449,"children":450},{},[451],{"type":49,"value":452},"}\n",{"type":43,"tag":58,"props":454,"children":456},{"id":455},"stream-state-transitions",[457],{"type":49,"value":458},"Stream state transitions",{"type":43,"tag":52,"props":460,"children":461},{},[462,464,470,472,478],{"type":49,"value":463},"A ",{"type":43,"tag":146,"props":465,"children":467},{"className":466},[],[468],{"type":49,"value":469},"Stream",{"type":49,"value":471}," is a capability attached to a started ",{"type":43,"tag":146,"props":473,"children":475},{"className":474},[],[476],{"type":49,"value":477},"DeviceSession",{"type":49,"value":479},":",{"type":43,"tag":287,"props":481,"children":485},{"className":482,"code":484,"language":49,"meta":292},[483],"language-text","stopped → waitingForDevice → starting → streaming → paused → stopped\n",[486],{"type":43,"tag":146,"props":487,"children":488},{"__ignoreMap":292},[489],{"type":49,"value":484},{"type":43,"tag":287,"props":491,"children":493},{"className":289,"code":492,"language":291,"meta":292,"style":292},"guard let stream = try session.addStream(config: StreamConfiguration()) else { return }\n\nlet token = stream.statePublisher.listen { state in\n    Task { @MainActor in\n        \u002F\u002F React to state changes\n    }\n}\n",[494],{"type":43,"tag":146,"props":495,"children":496},{"__ignoreMap":292},[497,505,512,520,528,536,543],{"type":43,"tag":298,"props":498,"children":499},{"class":300,"line":301},[500],{"type":43,"tag":298,"props":501,"children":502},{},[503],{"type":49,"value":504},"guard let stream = try session.addStream(config: StreamConfiguration()) else { return }\n",{"type":43,"tag":298,"props":506,"children":507},{"class":300,"line":310},[508],{"type":43,"tag":298,"props":509,"children":510},{"emptyLinePlaceholder":323},[511],{"type":49,"value":326},{"type":43,"tag":298,"props":513,"children":514},{"class":300,"line":319},[515],{"type":43,"tag":298,"props":516,"children":517},{},[518],{"type":49,"value":519},"let token = stream.statePublisher.listen { state in\n",{"type":43,"tag":298,"props":521,"children":522},{"class":300,"line":329},[523],{"type":43,"tag":298,"props":524,"children":525},{},[526],{"type":49,"value":527},"    Task { @MainActor in\n",{"type":43,"tag":298,"props":529,"children":530},{"class":300,"line":338},[531],{"type":43,"tag":298,"props":532,"children":533},{},[534],{"type":49,"value":535},"        \u002F\u002F React to state changes\n",{"type":43,"tag":298,"props":537,"children":538},{"class":300,"line":347},[539],{"type":43,"tag":298,"props":540,"children":541},{},[542],{"type":49,"value":443},{"type":43,"tag":298,"props":544,"children":545},{"class":300,"line":356},[546],{"type":43,"tag":298,"props":547,"children":548},{},[549],{"type":49,"value":452},{"type":43,"tag":58,"props":551,"children":553},{"id":552},"common-transitions",[554],{"type":49,"value":555},"Common transitions",{"type":43,"tag":52,"props":557,"children":558},{},[559],{"type":49,"value":560},"The device changes session state when:",{"type":43,"tag":70,"props":562,"children":563},{},[564,569,574,579,584],{"type":43,"tag":74,"props":565,"children":566},{},[567],{"type":49,"value":568},"User performs a system gesture that opens another experience",{"type":43,"tag":74,"props":570,"children":571},{},[572],{"type":49,"value":573},"Another app starts a device session",{"type":43,"tag":74,"props":575,"children":576},{},[577],{"type":49,"value":578},"User removes or folds the glasses (Bluetooth disconnects)",{"type":43,"tag":74,"props":580,"children":581},{},[582],{"type":49,"value":583},"User removes the app from Meta AI companion app",{"type":43,"tag":74,"props":585,"children":586},{},[587],{"type":49,"value":588},"Connectivity between companion app and glasses drops",{"type":43,"tag":58,"props":590,"children":592},{"id":591},"pause-and-resume",[593],{"type":49,"value":594},"Pause and resume",{"type":43,"tag":52,"props":596,"children":597},{},[598],{"type":49,"value":599},"When a session is paused:",{"type":43,"tag":70,"props":601,"children":602},{},[603,608,613],{"type":43,"tag":74,"props":604,"children":605},{},[606],{"type":49,"value":607},"The device keeps the connection alive",{"type":43,"tag":74,"props":609,"children":610},{},[611],{"type":49,"value":612},"Streams stop delivering data",{"type":43,"tag":74,"props":614,"children":615},{},[616,618],{"type":49,"value":617},"The device may resume by returning to ",{"type":43,"tag":146,"props":619,"children":621},{"className":620},[],[622],{"type":49,"value":203},{"type":43,"tag":52,"props":624,"children":625},{},[626,628,633,635,640,642,647],{"type":49,"value":627},"Your app should ",{"type":43,"tag":78,"props":629,"children":630},{},[631],{"type":49,"value":632},"not",{"type":49,"value":634}," attempt to restart while paused — wait for ",{"type":43,"tag":146,"props":636,"children":638},{"className":637},[],[639],{"type":49,"value":203},{"type":49,"value":641}," or ",{"type":43,"tag":146,"props":643,"children":645},{"className":644},[],[646],{"type":49,"value":269},{"type":49,"value":648},".",{"type":43,"tag":58,"props":650,"children":652},{"id":651},"device-availability",[653],{"type":49,"value":654},"Device availability",{"type":43,"tag":52,"props":656,"children":657},{},[658],{"type":49,"value":659},"Monitor device availability to know when sessions can start:",{"type":43,"tag":287,"props":661,"children":663},{"className":289,"code":662,"language":291,"meta":292,"style":292},"Task {\n    for await devices in Wearables.shared.devicesStream() {\n        \u002F\u002F Update list of available glasses\n    }\n}\n",[664],{"type":43,"tag":146,"props":665,"children":666},{"__ignoreMap":292},[667,674,682,690,697],{"type":43,"tag":298,"props":668,"children":669},{"class":300,"line":301},[670],{"type":43,"tag":298,"props":671,"children":672},{},[673],{"type":49,"value":335},{"type":43,"tag":298,"props":675,"children":676},{"class":300,"line":310},[677],{"type":43,"tag":298,"props":678,"children":679},{},[680],{"type":49,"value":681},"    for await devices in Wearables.shared.devicesStream() {\n",{"type":43,"tag":298,"props":683,"children":684},{"class":300,"line":319},[685],{"type":43,"tag":298,"props":686,"children":687},{},[688],{"type":49,"value":689},"        \u002F\u002F Update list of available glasses\n",{"type":43,"tag":298,"props":691,"children":692},{"class":300,"line":329},[693],{"type":43,"tag":298,"props":694,"children":695},{},[696],{"type":49,"value":443},{"type":43,"tag":298,"props":698,"children":699},{"class":300,"line":338},[700],{"type":43,"tag":298,"props":701,"children":702},{},[703],{"type":49,"value":452},{"type":43,"tag":52,"props":705,"children":706},{},[707],{"type":49,"value":708},"Key behaviors:",{"type":43,"tag":70,"props":710,"children":711},{},[712,722,733],{"type":43,"tag":74,"props":713,"children":714},{},[715,717],{"type":49,"value":716},"Closing hinges disconnects Bluetooth → forces ",{"type":43,"tag":146,"props":718,"children":720},{"className":719},[],[721],{"type":49,"value":269},{"type":43,"tag":74,"props":723,"children":724},{},[725,727,731],{"type":49,"value":726},"Opening hinges restores Bluetooth but does ",{"type":43,"tag":78,"props":728,"children":729},{},[730],{"type":49,"value":632},{"type":49,"value":732}," restart sessions",{"type":43,"tag":74,"props":734,"children":735},{},[736],{"type":49,"value":737},"Start a new session after the device becomes available again",{"type":43,"tag":58,"props":739,"children":741},{"id":740},"implementation-checklist",[742],{"type":49,"value":743},"Implementation checklist",{"type":43,"tag":70,"props":745,"children":748},{"className":746},[747],"contains-task-list",[749,781,790,804,813],{"type":43,"tag":74,"props":750,"children":753},{"className":751},[752],"task-list-item",[754,759,761,766,768,773,774,779],{"type":43,"tag":755,"props":756,"children":758},"input",{"disabled":323,"type":757},"checkbox",[],{"type":49,"value":760}," Handle all relevant session states (",{"type":43,"tag":146,"props":762,"children":764},{"className":763},[],[765],{"type":49,"value":203},{"type":49,"value":767},", ",{"type":43,"tag":146,"props":769,"children":771},{"className":770},[],[772],{"type":49,"value":225},{"type":49,"value":767},{"type":43,"tag":146,"props":775,"children":777},{"className":776},[],[778],{"type":49,"value":269},{"type":49,"value":780},")",{"type":43,"tag":74,"props":782,"children":784},{"className":783},[752],[785,788],{"type":43,"tag":755,"props":786,"children":787},{"disabled":323,"type":757},[],{"type":49,"value":789}," Monitor device availability before starting work",{"type":43,"tag":74,"props":791,"children":793},{"className":792},[752],[794,797,799],{"type":43,"tag":755,"props":795,"children":796},{"disabled":323,"type":757},[],{"type":49,"value":798}," Release resources only after ",{"type":43,"tag":146,"props":800,"children":802},{"className":801},[],[803],{"type":49,"value":269},{"type":43,"tag":74,"props":805,"children":807},{"className":806},[752],[808,811],{"type":43,"tag":755,"props":809,"children":810},{"disabled":323,"type":757},[],{"type":49,"value":812}," Don't infer transition causes — rely only on observable state",{"type":43,"tag":74,"props":814,"children":816},{"className":815},[752],[817,820,822,827],{"type":43,"tag":755,"props":818,"children":819},{"disabled":323,"type":757},[],{"type":49,"value":821}," Don't restart during ",{"type":43,"tag":146,"props":823,"children":825},{"className":824},[],[826],{"type":49,"value":225},{"type":49,"value":828}," — wait for system to resume or stop",{"type":43,"tag":58,"props":830,"children":832},{"id":831},"links",[833],{"type":49,"value":834},"Links",{"type":43,"tag":70,"props":836,"children":837},{},[838],{"type":43,"tag":74,"props":839,"children":840},{},[841],{"type":43,"tag":842,"props":843,"children":847},"a",{"href":844,"rel":845},"https:\u002F\u002Fwearables.developer.meta.com\u002Fdocs\u002Flifecycle-events",[846],"nofollow",[848],{"type":49,"value":849},"Session lifecycle documentation",{"type":43,"tag":851,"props":852,"children":853},"style",{},[854],{"type":49,"value":855},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":857,"total":374},[858,875,889,902,922,935,950],{"slug":859,"name":859,"fn":860,"description":861,"org":862,"tags":863,"stars":26,"repoUrl":27,"updatedAt":874},"camera-streaming","configure camera streaming and photo capture","Stream, video frames, photo capture, resolution\u002Fframe rate configuration",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[864,867,870,871],{"name":865,"slug":866,"type":16},"Camera","camera",{"name":868,"slug":869,"type":16},"Hardware","hardware",{"name":21,"slug":22,"type":16},{"name":872,"slug":873,"type":16},"Video","video","2026-05-15T06:14:43.555881",{"slug":876,"name":876,"fn":877,"description":878,"org":879,"tags":880,"stars":26,"repoUrl":27,"updatedAt":888},"dat-conventions","develop iOS applications with DAT SDK","Swift patterns, async\u002Fawait, naming conventions, key types for DAT SDK iOS development",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[881,882,883,886],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":884,"slug":885,"type":16},"SDK","sdk",{"name":887,"slug":291,"type":16},"Swift","2026-05-15T06:14:42.334435",{"slug":890,"name":890,"fn":891,"description":892,"org":893,"tags":894,"stars":26,"repoUrl":27,"updatedAt":901},"debugging","debug wearable device software","Common issues, Developer Mode, version compatibility, state machine diagnosis",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[895,897,900],{"name":896,"slug":890,"type":16},"Debugging",{"name":898,"slug":899,"type":16},"Engineering","engineering",{"name":21,"slug":22,"type":16},"2026-05-15T06:14:38.626606",{"slug":903,"name":903,"fn":904,"description":905,"org":906,"tags":907,"stars":26,"repoUrl":27,"updatedAt":921},"display-access","manage display capabilities on wearable devices","Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[908,911,914,917,920],{"name":909,"slug":910,"type":16},"Design","design",{"name":912,"slug":913,"type":16},"Images","images",{"name":915,"slug":916,"type":16},"Interaction","interaction",{"name":918,"slug":919,"type":16},"UI Components","ui-components",{"name":872,"slug":873,"type":16},"2026-05-15T06:14:39.844502",{"slug":923,"name":923,"fn":924,"description":925,"org":926,"tags":927,"stars":26,"repoUrl":27,"updatedAt":934},"getting-started","set up Meta wearable SDK integration","SDK setup, Swift Package Manager integration, Info.plist configuration, and first connection to Meta glasses",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[928,931,932,933],{"name":929,"slug":930,"type":16},"Configuration","configuration",{"name":21,"slug":22,"type":16},{"name":884,"slug":885,"type":16},{"name":887,"slug":291,"type":16},"2026-05-15T06:14:41.086639",{"slug":936,"name":936,"fn":937,"description":938,"org":939,"tags":940,"stars":26,"repoUrl":27,"updatedAt":949},"mockdevice-testing","test wearable apps with mock devices","MockDeviceKit for testing without physical glasses hardware",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[941,942,943,946],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":944,"slug":945,"type":16},"QA","qa",{"name":947,"slug":948,"type":16},"Testing","testing","2026-05-15T06:14:37.406692",{"slug":951,"name":951,"fn":952,"description":953,"org":954,"tags":955,"stars":26,"repoUrl":27,"updatedAt":961},"permissions-registration","register apps with Meta AI","App registration with Meta AI, camera permission flows",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[956,957,958],{"name":865,"slug":866,"type":16},{"name":21,"slug":22,"type":16},{"name":959,"slug":960,"type":16},"Permissions","permissions","2026-05-15T06:14:46.030253",{"items":963,"total":1084},[964,986,998,1019,1026,1033,1039,1047,1054,1061,1067,1077],{"slug":965,"name":965,"fn":966,"description":967,"org":968,"tags":969,"stars":983,"repoUrl":984,"updatedAt":985},"relay-best-practices","write idiomatic Relay code","Best practices for writing idiomatic Relay code. ALWAYS use this skill when writing or modifying React components that use Relay for data fetching. Covers fragments, queries, mutations, pagination, and common anti-patterns. Use when you see `useFragment`, `useLazyLoadQuery`, `usePreloadedQuery`, `useMutation`, `usePaginationFragment`, `graphql` template literals, `react-relay` imports, or `__generated__\u002F*.graphql` files. Also use when asked to explain Relay concepts, debug Relay issues, or review Relay code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[970,971,974,977,980],{"name":898,"slug":899,"type":16},{"name":972,"slug":973,"type":16},"Frontend","frontend",{"name":975,"slug":976,"type":16},"GraphQL","graphql",{"name":978,"slug":979,"type":16},"React","react",{"name":981,"slug":982,"type":16},"Relay","relay",18950,"https:\u002F\u002Fgithub.com\u002Ffacebook\u002Frelay","2026-04-22T04:58:15.370563",{"slug":987,"name":987,"fn":988,"description":989,"org":990,"tags":991,"stars":983,"repoUrl":984,"updatedAt":997},"relay-performance","optimize Relay application performance","Performance best practices for Relay applications. Use when optimizing data fetching, reducing re-renders, configuring caching, or improving time to first meaningful paint. Covers query placement, @defer, pagination, fetch policies, garbage collection, fragment granularity, and server-side filtering. Companion to the relay-best-practices skill which covers correctness and architecture.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[992,993,994,995,996],{"name":972,"slug":973,"type":16},{"name":975,"slug":976,"type":16},{"name":14,"slug":15,"type":16},{"name":978,"slug":979,"type":16},{"name":981,"slug":982,"type":16},"2026-06-10T07:30:28.726513",{"slug":999,"name":999,"fn":1000,"description":1001,"org":1002,"tags":1003,"stars":1016,"repoUrl":1017,"updatedAt":1018},"add-shape-types-to-torch-model","annotate PyTorch models with tensor shapes","Port a PyTorch model to use pyrefly's tensor shape type system (Tensor[[B, C, H, W]], Int[T]). Use this skill whenever the user wants to add shape annotations to a PyTorch model, type a model with tensor dimensions, port a model to use shape tracking, or annotate model forward methods with tensor shapes. Also use when the user mentions tensor shape ports, Int types for PyTorch, or pyrefly shape checking on a model file. Invoke BEFORE starting any model port — the skill's gated workflow prevents common failure modes.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1004,1007,1010,1013],{"name":1005,"slug":1006,"type":16},"Data Modeling","data-modeling",{"name":1008,"slug":1009,"type":16},"Deep Learning","deep-learning",{"name":1011,"slug":1012,"type":16},"Python","python",{"name":1014,"slug":1015,"type":16},"PyTorch","pytorch",6833,"https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fpyrefly","2026-07-18T05:12:08.515952",{"slug":859,"name":859,"fn":860,"description":861,"org":1020,"tags":1021,"stars":26,"repoUrl":27,"updatedAt":874},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1022,1023,1024,1025],{"name":865,"slug":866,"type":16},{"name":868,"slug":869,"type":16},{"name":21,"slug":22,"type":16},{"name":872,"slug":873,"type":16},{"slug":876,"name":876,"fn":877,"description":878,"org":1027,"tags":1028,"stars":26,"repoUrl":27,"updatedAt":888},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1029,1030,1031,1032],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":884,"slug":885,"type":16},{"name":887,"slug":291,"type":16},{"slug":890,"name":890,"fn":891,"description":892,"org":1034,"tags":1035,"stars":26,"repoUrl":27,"updatedAt":901},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1036,1037,1038],{"name":896,"slug":890,"type":16},{"name":898,"slug":899,"type":16},{"name":21,"slug":22,"type":16},{"slug":903,"name":903,"fn":904,"description":905,"org":1040,"tags":1041,"stars":26,"repoUrl":27,"updatedAt":921},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1042,1043,1044,1045,1046],{"name":909,"slug":910,"type":16},{"name":912,"slug":913,"type":16},{"name":915,"slug":916,"type":16},{"name":918,"slug":919,"type":16},{"name":872,"slug":873,"type":16},{"slug":923,"name":923,"fn":924,"description":925,"org":1048,"tags":1049,"stars":26,"repoUrl":27,"updatedAt":934},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1050,1051,1052,1053],{"name":929,"slug":930,"type":16},{"name":21,"slug":22,"type":16},{"name":884,"slug":885,"type":16},{"name":887,"slug":291,"type":16},{"slug":936,"name":936,"fn":937,"description":938,"org":1055,"tags":1056,"stars":26,"repoUrl":27,"updatedAt":949},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1057,1058,1059,1060],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":944,"slug":945,"type":16},{"name":947,"slug":948,"type":16},{"slug":951,"name":951,"fn":952,"description":953,"org":1062,"tags":1063,"stars":26,"repoUrl":27,"updatedAt":961},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1064,1065,1066],{"name":865,"slug":866,"type":16},{"name":21,"slug":22,"type":16},{"name":959,"slug":960,"type":16},{"slug":1068,"name":1068,"fn":1069,"description":1070,"org":1071,"tags":1072,"stars":26,"repoUrl":27,"updatedAt":1076},"sample-app-guide","build wearable apps with camera streaming","Building a complete DAT app with camera streaming and photo capture",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1073,1074,1075],{"name":865,"slug":866,"type":16},{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},"2026-05-15T06:14:36.185947",{"slug":4,"name":4,"fn":5,"description":6,"org":1078,"tags":1079,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1080,1081,1082,1083],{"name":21,"slug":22,"type":16},{"name":24,"slug":25,"type":16},{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},27]