From 3b9e6ae55f52cf4b34549f8eed8243ee7440aa8b Mon Sep 17 00:00:00 2001 From: Taksh Kothari Date: Sun, 29 Nov 2026 06:05:38 +0530 Subject: [PATCH] fix: drop BLE notify-on-connect options (#1758) * drop notify-on-connect options from queued BLE connects Those keys are what raises the lock-screen accessory prompt that names the app. * drop notify-on-connect options from background pending connects The wake-on-proximity arm path was the other place those options were passed. * say people instead of users in the Bluetooth usage strings House copy never says user, and these two lines were the ones still doing it. --- bitchat/Info.plist | 4 ++-- bitchat/Services/BLE/BLERadioController.swift | 16 +++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/bitchat/Info.plist b/bitchat/Info.plist index 198ba9f1..ca61094e 100644 --- a/bitchat/Info.plist +++ b/bitchat/Info.plist @@ -36,9 +36,9 @@ LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSBluetoothAlwaysUsageDescription - bitchat uses Bluetooth to create a secure mesh network for chatting with nearby users. + bitchat uses Bluetooth to create a secure mesh network for chatting with nearby people. NSBluetoothPeripheralUsageDescription - bitchat uses Bluetooth to discover and connect with other bitchat users nearby. + bitchat uses Bluetooth to discover and connect with other people nearby. NSCameraUsageDescription bitchat uses the camera to scan QR codes to verify peers and to take photos to share in mesh chats. NSLocationWhenInUseUsageDescription diff --git a/bitchat/Services/BLE/BLERadioController.swift b/bitchat/Services/BLE/BLERadioController.swift index fc1b2e43..e383e133 100644 --- a/bitchat/Services/BLE/BLERadioController.swift +++ b/bitchat/Services/BLE/BLERadioController.swift @@ -349,12 +349,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) @@ -462,11 +460,7 @@ final class BLERadioController { for: target.peripheralID ) target.peripheral.delegate = self.peripheralDelegate - central.connect(target.peripheral, options: [ - CBConnectPeripheralOptionNotifyOnConnectionKey: true, - CBConnectPeripheralOptionNotifyOnDisconnectionKey: true, - CBConnectPeripheralOptionNotifyOnNotificationKey: true - ]) + central.connect(target.peripheral, options: nil) } SecureLogger.info("🌙 Armed \(targets.count) pending background connect(s) for wake-on-proximity", category: .session) }