Manage a Group Activity Session with a Deterministic Finite State Machine
summary
Claims that a deterministic finite state machine reliably manages Apple Group Activities / SharePlay sessions by separating flow from operations and encoding all transitions in a state table. Uses GroupActivities API: activity types, prepareForActivation vs activate, group session messenger with reliable/unreliable messages (64k → 256k in iOS16), participant join/leave events, and activation pop‑up quirks that can disrupt shared flows. Implements transitions as events-only returns, logs every transition; demo mostly works but table size and iOS16 audio restrictions are real limits.
AI-written summary · about
chapters (11)
- 0:00Welcome
- 1:08Introduction
- 2:12Group Activities API
- 7:01Setting up API
- 13:25API quirks
- 16:56Why a deterministic finite state machine
- 19:37State transition diagram
- 23:30Implementing FSM core
- 26:25Advantages of the state machine approach
- 26:47Live demo & UI
- 30:57Concluding remarks
related talks
43mGood Intentions II: Enemy of the State
44mManaging Complex Application State with Finite-State Machines
24mLeveraging the Power of State Machines in Swift
30mReactive State Machine
33mHow Not to Shoot Yourself in the Foot with a Finite State Machine
20mSetState, We Need to Talk!
10m11_24_Opening of the Day
41mFinita la State Machine — MVI in an iOS App
