demo_blocker.mov
A simple app blocker that bricks your iPhone to lock distracting apps. The only way to unlock them is by scanning a QR code displayed on an ESP32.
No network connection is needed between the iPhone and the ESP32: they use a shared secret + timestamp (TOTP algorithm, RFC 6238) to generate and verify codes. The ESP32 only needs internet at boot to sync its clock via NTP.
Inspired by Brick.
- Apple Developer account (required to use the Screen Time API)
- PlatformIO
- Xcode + XcodeGen
- Lilygo ESP32 T-Display S3
git config core.hooksPath .githooksThis enables a pre-commit hook that prevents from committing hardcoded WiFi credentials.
Edit esp32/src/config.h:
#define WIFI_SSID "your_wifi_name"
#define WIFI_PASSWORD "your_wifi_password"WiFi is only used for NTP time sync on boot.
The 20 bytes TOTP secret can be found esp32/src/config.h and ios/ESPBlocker/Config.swift.
cd esp32
~/.platformio/penv/bin/pio run -t uploadcd ios
xcodegen generate
open ESPBlocker.xcodeprojSet your Development Team in Xcode, then build to device.