Sub topic 3
AirDrop in Practice Between a Mac and an iPhone
Assume you can use Finder on macOS, Settings on iOS, and both devices use compatible recent operating systems. AirDrop does not require the same Apple Account, but both devices should have Wi-Fi and Bluetooth enabled and be nearby.
AirDrop in practice
On the iPhone, open Settings > General > AirDrop and choose Contacts Only or Everyone for 10 Minutes. On the Mac, open Control Center > AirDrop and select the same type of receiving permission.
To send a file from the Mac:
- In Finder, select the file.
- Choose Share > AirDrop.
- Select the iPhone.
- Accept the transfer on the iPhone if prompted.
To send a photo from the iPhone, tap Share, choose AirDrop, and select the Mac. Received files usually appear in Downloads on the Mac. Photos received by the iPhone may appear in Photos.
When a feature does not show up or fails
Check these items in order:
- Keep the devices close together and unlock the receiving device.
- Turn Wi-Fi and Bluetooth off and on again.
- Confirm AirDrop is enabled on both devices.
- Temporarily choose Everyone for 10 Minutes.
- Turn off Personal Hotspot, which can interfere with discovery.
- Restart both devices and install pending system updates.
If the device appears but the transfer fails, try one small file first. A large transfer can expose storage, network, or permission problems.
Under the hood
Bluetooth provides short-range discovery and helps the devices identify one another. After approval, peer-to-peer Wi-Fi carries the file directly. iCloud supports account-based Continuity coordination, but AirDrop does not upload the file to iCloud as an intermediate step.
Privacy and security considerations
Use Contacts Only when practical. Everyone for 10 Minutes is useful for a quick exchange, but it makes the device discoverable to nearby users for a limited time. Review the recipient name before accepting, and avoid accepting unexpected requests in public places.
For developers: adopting Handoff with `NSUserActivity`
An app publishes an NSUserActivity describing the current task. The receiving app declares the same activity type in NSUserActivityTypes and restores state from userInfo.
let activity = NSUserActivity(activityType: "com.example.notes.viewing-note")
activity.userInfo = ["noteID": "42"]
activity.isEligibleForHandoff = true
activity.becomeCurrent()The receiving app handles that activity type and opens note 42.
Exercise
Which connection carries the AirDrop file after the recipient accepts it?
Show answer
A direct peer-to-peer Wi-Fi connection carries the file; Bluetooth mainly supports discovery.