Sub topic 4
Handoff: continue an activity on the other device
This chapter assumes you have an Apple Account signed in on both devices, that Bluetooth and Wi-Fi are on, and that you have already turned on Handoff in Settings (covered in the previous chapter). It focuses on how Handoff behaves, how to use it, and how to check that it is working.
What Handoff does
Handoff lets you start a task on one device and pick it up on another nearby device without saving, sending, or searching for anything. You might begin an email on your iPhone, then finish it on your Mac. You might read a web page in Safari on the Mac and open the same page on the iPhone.
Handoff moves the activity, not a copy of a file. An activity is a small description of what you are doing in an app, such as "viewing this web page" or "editing this draft." The receiving device opens its own copy of the app and restores that state.
Apps that commonly support Handoff include Safari, Mail, Calendar, Contacts, Maps, Messages, Notes, Reminders, Pages, Numbers, and Keynote. Many third-party apps support it too, but each app decides for itself.
How an activity appears
When one device advertises an activity, the other device shows a prompt. Where it appears depends on the device.
| Receiving device | Where the Handoff prompt appears | How to accept it |
|---|---|---|
| Mac | An app icon at the left or bottom end of the Dock, with a small iPhone badge | Click the icon |
| Mac | The app switcher (Command-Tab) | Select the icon with the iPhone badge |
| iPhone | A banner at the bottom of the App Switcher | Tap the banner |
The prompt only shows for the most recent activity. Once you start something new, the earlier offer goes away.
Walkthrough: iPhone to Mac
- On the iPhone, open Safari and load a web page.
- Keep the iPhone unlocked or just locked, near the Mac.
- On the Mac, look at the Dock. A Safari icon with a small iPhone badge appears.
- Click it. Safari on the Mac opens the same page.
To go the other way, open a page in Safari on the Mac. On the iPhone, open the App Switcher by swiping up from the bottom edge and pausing, or by double-pressing the Home button. A banner for Safari appears. Tap it.
Walkthrough: check the setup from Terminal
If the prompt does not appear, first confirm the basics. Run these commands on the Mac.
sw_vers
system_profiler SPBluetoothDataType | head -n 15sw_vers prints the macOS version. system_profiler prints the start of the Bluetooth report. Check that Bluetooth is on and that the Mac reports a state, not an error. Both devices need a Continuity-capable OS release, so compare the version with the requirements from earlier in the tutorial.
What the diagram shows
The diagram below shows the sequence of events. The first device advertises the activity, and the second device shows an offer and requests the details when you accept.
Common reasons Handoff does not work
Most failures come from a small set of causes.
- Handoff is off on one of the devices. Check System Settings > General > AirDrop & Handoff on the Mac, and Settings > General > AirPlay & Handoff on the iPhone.
- The devices use different Apple Accounts. Both must be signed in to the same one.
- Bluetooth or Wi-Fi is off on either device.
- The devices are too far apart. Handoff needs Bluetooth range, which is roughly within the same room.
- The app does not support Handoff, or the activity has no state to continue (for example, the app is on its home screen).
- The activity is old. Open something new in the app and try again.
A quick reset that often helps is to turn Bluetooth off and on again on both devices, then repeat the activity.
A developer note
An app takes part in Handoff by creating an activity object. You will see this in detail in the final chapter. For now, remember that the sending app describes the activity, and the receiving app must be able to recognize and restore it. That is why Handoff only works between apps that agree on the activity type, usually two versions of the same app.
Exercise
You start writing a note in Notes on your iPhone, but no Notes icon appears in the Mac's Dock. Both devices are signed in to the same Apple Account. Name three things to check.
Show answer
Check that Handoff is turned on in both devices' settings, that Bluetooth and Wi-Fi are on for both, and that the devices are close together. Also confirm that the iPhone is running a note with some content open, so there is an activity to offer, and that both devices run OS versions that support Continuity.
Exercise
Why does Handoff usually move a task between two versions of the same app, and not between two unrelated apps?
Show answer
The sending app describes the activity with an activity type, and the receiving app must declare that same type to restore it. Two versions of the same app share the type. Unrelated apps normally do not.