diff --git a/bitchat/Info.plist b/bitchat/Info.plist index 57ddfa11..60c9fa53 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. NSLocationWhenInUseUsageDescription diff --git a/bitchat/Services/BLE/BLERadioController.swift b/bitchat/Services/BLE/BLERadioController.swift index cf9d6c2d..46bdf789 100644 --- a/bitchat/Services/BLE/BLERadioController.swift +++ b/bitchat/Services/BLE/BLERadioController.swift @@ -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) }