BLE connexion: popup display rules

Hello,

I'm new to CoreBluetooth framework and I want to understand the rules behind Bluetooth connexion popups displayed by iOS.

I understood that while developing a BLE Central role application, I have no control over whitch security popup bill be displayed.

During my tests with Apple BLE demo project CoreBluetoothLESample, I managed to activate the display of a pairing popup adding .indicateEncryptionRequired option to the characteristic options in the PeripheralViewController class:

let transferCharacteristic = CBMutableCharacteristic(
        type: TransferService.characteristicUUID,
        properties: [.notify, .writeWithoutResponse, .indicateEncryptionRequired],
        value: nil,
        permissions: [.readable, .writeable]
    )

My question is: Can I find a documentation about pairing popups display rules on central iOS device (just a "Cancel/Pair" popup without PIN check, popup with PIN check, popup asking to enter a PIN, or no popup at all) regarding peripheral security level and/or capabilities (can display a PIN or not) ?

Thank you for any help !

BLE connexion: popup display rules
 
 
Q