mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
The iPhone app links Botan over Bluetooth and turns the sessions the Mac publishes to iCloud into
Botan's line, and its button into the same Decision / Answer records a tap sends. So Botan works
wherever the iPhone has the network, with the iPhone locked.
- BotanBridge.swift: CoreBluetooth central with state restoration; bluetooth-central background mode;
written after every fetch (push or Botan's 15 s heartbeat); presses sent inside a background task
- BotanLinkScreen moves to CoucouKit, shared by the Mac and the iPhone; the heartbeat decides nothing
- Settings → Botan on the iPhone (off by default, says a press needs no Face ID); Bluetooth purpose string
- Mac and iPhone link only the first Botan met, remembered ("Forget this Botan")
- SessionItem reads approvalTool (optional, old caches still load)
- docs/BOTAN_LINK.md: the iPhone, locked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B9uCpBfczfSCvLARne8hCd
12 lines
589 B
Bash
Executable File
12 lines
589 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# The Mac side of the Botan link (docs/BOTAN_LINK.md): what the screen shows for the island's picture,
|
|
# the line's fields, and the button's decisions against the request still pending. Pure file only:
|
|
# no Bluetooth, no AppState.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-botan-link.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc -swift-version 6 -strict-concurrency=complete \
|
|
NotchBuddy/Sources/CoucouKit/BotanLinkScreen.swift tests/BotanLinkTests.swift -o "$TEST_DIR/botan-link-tests"
|
|
"$TEST_DIR/botan-link-tests"
|