GaitGuardAI is an iOS + watchOS app that monitors gait on an Apple Watch and provides rhythmic haptic cueing to help during walking initiation and turning—where freezing of gait (FoG) often occurs. It streams live data to an iPhone companion app for analytics and remote control.
This is a cueing aid and prototype. It is not a medical device. Use with supervision before relying on it for safety-critical situations.
- Freeze detection: Detects when you attempt to start walking or turn but don’t produce steps
- Rhythmic haptic cueing: Metronome-style pulses to help break freezes (different rhythms for start vs turn), with a brief on-screen assist banner
- Step tracking: Live step count, cadence, and distance via CMPedometer
- Calibration: 30-second walk to personalize detection thresholds
- Background monitoring: Uses HealthKit workout sessions so tracking continues when the screen is off
- Pager pages: SCORE / METRICS / TODAY with page dots
- Home dashboard: Connection status, Ready vs live gait score, today’s assists, remote Start/Stop when the Watch is reachable
- History: Assist timeline with severity labels; daily notes; clear requires confirmation
- Trends: Charts by assist type, hour, and severity (raw XYZ motion under Advanced)
- Settings (formerly Profile): Haptics, detection presets, calibration guide, test vibration, factory reset
- Calibration results: Persisted on the phone and shown after calibration
- Synced gait score: Watch is the source of truth; phone displays the score the Watch sends
People who:
- Have a foot that “sticks” when starting to walk
- Struggle to turn without assistance
- May speed up or lean forward (festination)
The app uses Core Motion on the watch:
- Sensors:
CMDeviceMotion,userAcceleration,rotationRate(yaw for turning) - Sampling: ~50 Hz
- Logic: Detects movement attempts without step cadence → triggers haptic cue
- Calibration: Personalizes the baseline threshold from a 30-second walk
- Xcode 15+
- watchOS 10+ / iOS 17+
- Physical Apple Watch paired with iPhone (WatchConnectivity needs real devices)
- Open
GaitGuardAI/GaitGuardAI.xcodeprojin Xcode - Run GaitGuardAI-iPhone on your iPhone (this installs the Watch app too)
- Run GaitGuard Watch App on your paired Apple Watch
- Launch both apps and wait for WatchConnectivity to connect
- Start monitoring from the Watch or from iPhone Home/Settings when the Watch is reachable
- Enable the HealthKit capability for the Watch app in the Apple Developer portal
- The app uses
HKWorkoutSessionto keep monitoring when the screen is off
GaitGuardAI/
├── GaitGuardAI Watch App/
│ ├── ContentView.swift # Watch UI (SCORE / METRICS / TODAY)
│ ├── MotionDetector.swift # Motion processing, freeze detection, cueing, step counting
│ ├── GaitTrackingManager.swift # HKWorkoutSession for background
│ └── GaitGuardAIApp.swift
├── GaitGuardAI-iPhone/
│ ├── ContentView.swift # Home + History
│ ├── AnalyticsView.swift # Trends
│ ├── RemoteControlsView.swift # Settings
│ └── GaitGuardAIiPhoneApp.swift
└── Shared/
└── WatchConnectivityManager.swift # Watch ↔ iPhone sync (score, assists, remote start/stop)
- Turning difficulty can be high fall-risk. Use as a cueing aid, not a replacement for supervision.
- Consider involving a clinician or PT. Rhythmic cueing works best with taught strategies (staged turns, weight shift).
- The app does not detect falls or call emergency contacts.
- Not a medical device—use with supervision and professional guidance.
MIT License. See LICENSE for details.