Merge bbd58161bf4a0a597d20f776c3603824057c95dd into 04995f68e470a18d1fc99f86fa326c2a87bab4f2

This commit is contained in:
Taksh Kothari 2026-10-30 13:16:53 +05:30 committed by GitHub
commit cabab7ca3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 13 deletions

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.</string>
<key>NSLocationWhenInUseUsageDescription</key>

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)
@ -345,11 +343,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)
}