sl-ios 615dc405d0 fix: auto-connect to UWB_TAG on launch — no user action needed
Root cause: autoReconnect was false on init, so the
centralManagerDidUpdateState(.poweredOn) callback was a no-op.
User had to tap 'Scan' to set autoReconnect=true and start scanning.

Fixes:
- Set autoReconnect=true before creating CBCentralManager so the
  .poweredOn callback immediately starts scanning on every app launch
- Scan timeout (15s): on expiry, call reconnectAfterDelay() instead
  of staying idle — retries every 2s until TAG is found (handles
  TAG still booting after firmware flash)

Behaviour after this change:
  Launch → auto-scan within ~1s of Bluetooth ready
  TAG not found after 15s → retry after 2s, repeat indefinitely
  TAG disconnects → rescan after 2s
  TAG reboots/reflashes → found within one 15s scan window
  User taps Disconnect → autoReconnect=false, stops all retries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:01:47 -04:00
..