also looking at this
iOS: the Bluetooth scan pair — ratchet 35 → 33
#97
10 files
+679
-3
| @@ -64,7 +64,7 @@ swiftc -target "$TRIPLE" -sdk "$SDK" \ | ||
| 64 | 64 | "$ROOT/packages/zig/zig-out/lib/$LIB" \ |
| 65 | 65 | -framework UIKit -framework WebKit -framework Foundation -framework Security \ |
| 66 | 66 | -framework Vision -framework LocalAuthentication -framework PDFKit \ |
| 67 | -framework WatchConnectivity \ | |
| 67 | -framework WatchConnectivity -framework CoreBluetooth \ | |
| 68 | 68 | -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker "$OUT/sim.entitlements" \ |
| 69 | 69 | -o "$APP/CraftSlice" |
| 70 | 70 | |
| @@ -320,4 +320,16 @@ C54="$(count 54)" | ||
| 320 | 320 | [ "$C54" -ge 1 ] || { echo "FAIL: openSettings did not reply with a boolean"; exit 1; } |
| 321 | 321 | echo "ok: openSettings replied a real boolean, not \"granted\"/\"denied\" (i=54 seen ${C54}x)" |
| 322 | 322 | |
| 323 | C56="$(count 56)" | |
| 324 | # The refusal comes from centralManagerDidUpdateState, not from the handler: | |
| 325 | # startBluetoothScan returns having done nothing but create a manager, and the | |
| 326 | # radio answers later. So this passing proves the ticket survived the gap | |
| 327 | # between the call and the callback. | |
| 328 | [ "$C56" -ge 1 ] || { echo "FAIL: startBluetoothScan did not refuse from the state callback"; exit 1; } | |
| 329 | echo "ok: scan refused by the radio's own state, via a deferred ticket (i=56 seen ${C56}x)" | |
| 330 | ||
| 331 | C58="$(count 58)" | |
| 332 | [ "$C58" -ge 1 ] || { echo "FAIL: stopBluetoothScan did not resolve"; exit 1; } | |
| 333 | echo "ok: stopping with nothing running still answers true (i=58 seen ${C58}x)" | |
| 334 | ||
| 323 | 335 | echo "PASS" |