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.
This commit is contained in:
Taksh Kothari authored and GitHub committed 2026-11-28 14:35:38 -10:00
1 parent 7398f582f7
commit 3b9e6ae55f
2 files changed
+7 -13

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>bitchat uses Bluetooth to create a secure mesh network for chatting with nearby users.</string>
<string>bitchat uses Bluetooth to create a secure mesh network for chatting with nearby people.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>bitchat uses Bluetooth to discover and connect with other bitchat users nearby.</string>
<string>bitchat uses Bluetooth to discover and connect with other people nearby.</string>
<key>NSCameraUsageDescription</key>
<string>bitchat uses the camera to scan QR codes to verify peers and to take photos to share in mesh chats.</string>
<key>NSLocationWhenInUseUsageDescription</key>
+5 -11
View File
@@ -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)
}