Hacking Rule Systems & State Machines with Apple's GameplayKit Framework
summary
Shows how to use Apple’s GameplayKit (rules systems and state machines) beyond games to implement things like text validation or complex payment flows with many states and rules, aiming for improved readability, scalability and reusability. Includes concrete code examples and a GitHub repo demonstrating the approach.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:43What does it solve?
- 1:45Introduction
- 2:05GKRuleSystem
- 3:45Wrapper
- 5:05Password Validator
- 5:46Extracting Result
- 6:52GKState Machine
- 7:58State Machine Example
- 10:10Combo
- 11:42Init State + Fraud Check System
- 15:14Reading the Result
- 16:37Other Usecases
- 18:11Advantages
related talks
01h 03mUsing State Machines in SwiftUI — Fast, Simple, and Convenient
35mProgramming without recompiling
31mLeveraging AppKit to Improve Your Catalyst App
28mWorking with XcodeKit
21mIntroducing Combine to iOS without Over"reacting"
34mHacking Marzipan, Running iOS apps on Mac
32mA Guide to Using StoreKit2
47mMagic Words – Harnessing the Power of TextKit
