mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-11-22 08:17:28 +00:00
Merge bbd58161bf4a0a597d20f776c3603824057c95dd into 04995f68e470a18d1fc99f86fa326c2a87bab4f2
This commit is contained in:
commit
cabab7ca3d
@ -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>
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user