AirDrop: Bluetooth or Wi-Fi?
How does AirDrop work? I thought it is just Bluetooth, but I am starting to doubt that now.
Whenever I turn AirDrop on, my Wi-Fi and Bluetooth are automatically turned on. If I turn the Wi-Fi off, and try to AirDrop, sometimes it works, but sometimes it doesn't. It never works if I turn the Bluetooth off instead.
So... Why does this happen? How does AirDrop work?
AirDrop uses Bluetooth to create a peer-to-peer Wi-Fi network between the devices.
Each device creates a firewall around the connection and files are sent encrypted, which actually makes it safer than transferring via email. AirDrop will automatically detect nearby supported devices, and the devices only need to be close enough to establish a good Wi-Fi connection, making it possible to share files across several rooms.
The more detailed, and technical version of @Buscar웃's answer, from Apples iOS Security Guide (2018) Page 40, bolded by me:
iOS devices that support AirDrop use Bluetooth Low Energy (BLE) and Apple-created peer-to-peer Wi-Fi technology to send files and information to nearby devices, including AirDrop-capable Mac computers running OS X 10.11 or later. The Wi-Fi radio is used to communicate directly between devices without using any Internet connection or Wi-Fi Access Point. When a user enables AirDrop, a 2048-bit RSA identity is stored on the device. Additionally, an AirDrop identity hash is created based on the email addresses and phone numbers associated with the user’s Apple ID.
When a user chooses AirDrop as the method for sharing an item, the device emits an AirDrop signal over Bluetooth Low Energy. Other devices that are awake, in close proximity, and have AirDrop turned on detect the signal and respond with a shortened version of their owner’s identity hash.
AirDrop is set to share with Contacts Only by default. Users can also choose to use AirDrop to share with everyone, or turn off the feature entirely. In Contacts Only mode, the received identity hashes are compared with hashes of people in the initiator’s Contacts app. If a match is found, the sending device creates a peer-to-peer Wi-Fi network and advertises an AirDrop connection using Bonjour. Using this connection, the receiving devices send their full identity hashes to the initiator. If the full hash still matches Contacts, the recipient’s first name and photo (if present in Contacts) are displayed in the AirDrop share sheet.
When using AirDrop, the sending user selects who they want to share with. The sending device initiates an encrypted (TLS) connection with the receiving device, which exchanges their iCloud identity certificates. The identity in the certificates is verified against each user’s Contacts app. Then the receiving user is asked to accept the incoming transfer from the identified person or device. If multiple recipients have been selected, this process is repeated for each destination.
In the Everyone mode, the same process is used but if a match in Contacts isn’t found, the receiving devices are shown in the AirDrop send sheet with a silhouette with the device’s name, as defined in Settings > General > About > Name.
Organizations can restrict the use of AirDrop for devices or apps being managed by using an MDM solution.
Bluetooth LE is used for local discovery of other Airdroppers and WiFi direct is used for transmitting anything of meaningful size since it has a MUCH faster xfer rate.
And here's a longer version of that explanation.