drop notify-on-connect options from queued BLE connects

Those keys are what raises the lock-screen accessory prompt that names the app.
This commit is contained in:
Taksh 2026-10-11 06:54:15 +05:30
parent 5e9287fae1
commit 86fc1adb81

View File

@ -233,12 +233,10 @@ final class BLERadioController {
let peripheralID = candidate.peripheralID
linkStateStore.beginConnecting(to: peripheral, at: Date())
peripheral.delegate = peripheralDelegate
let options: [String: Any] = [
CBConnectPeripheralOptionNotifyOnConnectionKey: true,
CBConnectPeripheralOptionNotifyOnDisconnectionKey: true,
CBConnectPeripheralOptionNotifyOnNotificationKey: true
]
central.connect(peripheral, options: options)
// No CBConnectPeripheralOptionNotifyOn* keys. Those options are what
// makes iOS raise the lock-screen "accessory would like to open
// bitchat" prompt, and accepting it names the app.
central.connect(peripheral, options: nil)
scheduler.recordConnectionAttempt(at: Date())
SecureLogger.debug("\(logPrefix): \(candidate.name) [RSSI:\(candidate.rssi)]", category: .session)