A comprehensive SwiftUI iOS app for controlling YCY-YOKONEX Gen 2 electrostimulation devices.
- Liquid Glass UI — Full iOS 26 glass material support with fallbacks
- Multi-Channel Control — Independent Channel A/B with sync mode
- Waveform Engine — 22 built-in waveforms + custom waveform drawing editor
- Presets & Programs — 8 built-in presets, 2 programs, full custom creation
- Safety System — Emergency stop, strength ceilings, session timers, ramp rate limits
- Adaptive Biometrics — Optional HealthKit and Apple Watch heart-rate monitoring reduces output during elevated load and can emergency stop at critical thresholds
- Watch Companion — Starts a watchOS workout session so Apple Watch can stream fresh heart-rate samples to Edge Mode
- Local-First Connections — Bluetooth BLE and user-owned HTTP/WebSocket bridge control
- Comprehensive Settings — 8 categories with 60+ configurable options
- iOS 18.0+ deployment target
- watchOS 11.0+ for continuous Apple Watch heart-rate streaming
- Xcode 16+ baseline; Xcode 26 enables native Liquid Glass surfaces where available
- Swift 6
- HealthKit-capable device for adaptive heart-rate safety; Apple Watch or an external HR sensor is recommended for continuous Edge Mode
YCYEStim/
├── Models/ # Data types (Channel, Waveform, Preset, Program, etc.)
├── Services/ # Connection layers (BLE, HTTP) + stores
├── ViewModels/ # MVVM view models (Control, Settings, Device)
├── Views/
│ ├── Control/ # Dashboard, waveforms, presets
│ ├── Session/ # Programs, history
│ └── Settings/ # Settings, device pairing
├── WatchApp/ # Apple Watch workout session + heart-rate streaming
├── Extensions/ # Color, View, String helpers
└── Resources/ # Default presets JSON
- Settings → Connection → Bluetooth
- Scan for YCY devices
- Connect and control directly
- No internet needed
- Self-host the API-bridge
- Set server URL in Settings
- Commands sent via HTTP POST / WebSocket
Commands are JSON-encoded and sent through BLE or a user-owned API bridge:
// Channel control
{ "code": "game_opts", "actions": [{ "type": "estim", "action": "control_channel", "data": { "channel": "A", "strength": 60, "duration_ms": 5000 } }] }
// Trigger preset
{ "code": "game_cmd", "id": "preset_id" }
// Emergency stop
{ "code": "game_cmd", "id": "_stop_all" }- Global max strength limit (default 80%)
- Session timeout (default 60 min)
- Ramp rate limiting (5 units/sec)
- Confirmation required above threshold (default 60%)
- Emergency stop always visible
- Shake-to-stop gesture option
- Auto-shutdown on disconnect
- Optional HealthKit heart-rate safety caps output at elevated/high thresholds
- Apple Watch companion can run a workout session for continuous heart-rate updates
- Optional critical heart-rate emergency stop
The upstream YCY-YOKONEX OpenSource repository documents multiple protocol paths. YCYEStim intentionally supports only owner-controlled device paths: direct BLE and user-owned HTTP/WebSocket bridge control. Smart lock support is listed upstream as beta and is not implemented here yet.
xcodegen generate
open YCYEStim.xcodeprojYCYEStim.xcodeproj is generated locally and not committed. Requires XcodeGen.
No app runtime dependencies — pure Swift + SwiftUI + CoreBluetooth.
The watch companion is embedded in the iPhone app and can also run independently. After installing to iPhone, check the Watch app on iPhone under Available Apps if automatic watch app installation is disabled. The watch app starts a workout session and streams fresh heart-rate samples back to Edge Mode.