最終更新:2024-03-11 (月) 13:19:28 (50d)
CBCentralManager.connect
Top / CBCentralManager.connect
Establishes a local connection to a peripheral.
https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518766-connect
func connect( _ peripheral: CBPeripheral, options: [String : Any]? = nil )
- CBPeripheral
オプション
- https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/peripheral_connection_options
CBConnectPeripheralOptionNotifyOnConnectionKey A Boolean value that specifies whether the system should display an alert when connecting a peripheral in the background. CBConnectPeripheralOptionNotifyOnDisconnectionKey? A Boolean value that specifies whether the system should display an alert when disconnecting a peripheral in the background. CBConnectPeripheralOptionNotifyOnNotificationKey? A Boolean value that specifies whether the system should display an alert for any notification sent by a peripheral. CBConnectPeripheralOptionEnableTransportBridgingKey An option to bridge classic Bluetooth technology profiles, if already connected over Bluetooth Low Energy. CBConnectPeripheralOptionRequiresANCS? An option to require Apple Notification Center Service (ANCS) when connecting a device. CBConnectPeripheralOptionStartDelayKey? An option that indicates a delay before the system makes a connection.
Objective-C
- connectPeripheral?