Sub topic 4
Handoff: continue an activity on the other device
Handoff lets you start something on one Apple device and pick it up on another without redoing any work. You might be reading a web page on your iPhone and then open the same page on your Mac with one click. This chapter covers what Handoff does, how the offer appears on each device, what limits it, and how to diagnose it when it fails.
This chapter assumes the following:
- You have an Apple Account signed in on both a Mac and an iPhone.
- You have checked the requirements in the earlier chapter (Bluetooth, Wi-Fi, proximity, OS versions).
- You have turned Handoff on in the settings, as covered in "Turning the features on".
What Handoff transfers
Handoff transfers an activity, not a file and not a screen. An activity is a small description of what you are doing in an app, such as "viewing this web page", "editing this draft email", or "looking at this map location". The receiving device opens its own copy of the app and restores that state.
This has three consequences:
- Both devices need an app that understands the activity. Apple's apps such as Safari, Mail, Notes, Calendar, Maps, Messages, Pages, Numbers, and Keynote support it. Many third-party apps do too, but only if the developer added support.
- The second device does not mirror the first. If you scroll or type on the iPhone after the handoff, the Mac does not follow.
- Large content is not carried inside the activity. The app on the receiving device gets the document through iCloud or fetches it again. Only the pointer and state travel.
Handoff differs from the other two Continuity features. Universal Clipboard moves content you copied, and AirDrop moves files you choose to send. Handoff moves your place in an app.
How the offer appears
The offer shows up only on devices near the one you are using. It appears in a different place on each device.
| Direction | Where the offer appears | How to accept |
|---|---|---|
| iPhone to Mac | An app icon with a small iPhone badge in the Dock. The same icon appears at the left end of the Command-Tab app switcher. | Click the Dock icon, or choose it in the app switcher. |
| Mac to iPhone | A banner at the bottom of the App Switcher, labeled with the app name and the Mac it came from. | Open the App Switcher and tap the banner. |
| Mac to iPad | The same banner in the iPad's App Switcher. | Tap the banner. |
On a Mac with a Home-button-less iPhone, you open the App Switcher by swiping up from the bottom edge and pausing in the middle of the screen. On a Home-button iPhone, you double-press the Home button.
The offer is temporary. It reflects only the most recent activity on a nearby device. It disappears when you do something else on the source device, when that device locks, or when you move out of range. If you want to continue something, do it soon after you stop. Waiting a long time or switching apps on the source can make the offer vanish.
Only one offer per source device shows at a time. If two nearby devices both have activities, you may see two icons.
A worked example
Follow these steps to check that Handoff works between your two devices.
- On the iPhone, open Safari and load any web page.
- Look at your Mac without touching the iPhone. A Safari icon with an iPhone badge should appear in the Dock, at the end near the recent-apps area.
- Click it. Safari opens on the Mac with the same page.
- To test the other direction, load a different page in Safari on the Mac.
- On the iPhone, open the App Switcher. A banner near the bottom should show Safari from your Mac. Tap it.
If both directions work, Handoff is configured correctly. If only one direction works, the problem is almost always in the setting on the device that is not sending or not receiving. Each device has its own Handoff switch, and each switch controls both sending and receiving for that device.
Checking the Mac side from Terminal
You cannot see Handoff activity directly in Terminal, but you can confirm the two facts that most often explain a failure: the macOS release and whether Bluetooth hardware is reporting.
sw_vers
system_profiler SPBluetoothDataType | head -n 15sw_vers prints the product name and version of macOS. Compare it against the minimum versions in the requirements chapter. The system_profiler command prints the Bluetooth report. If the report shows the controller as off or shows no controller, the Bluetooth radio is the first thing to fix.
What happens behind the offer
The sequence is roughly as follows. Chapter "Under the hood" covers the transport details, so this is only the Handoff-specific view.
Four details matter in practice:
- The advertisement is small and carries only enough to say that an activity exists and which app it belongs to. The full state is requested only after you accept.
- Devices must be signed in to the same Apple Account, because the advertisement is encrypted so that only your own devices can read it.
- If the state is too large for the first exchange, the app can open a stream between the devices over a direct Wi-Fi link. This is why Wi-Fi must be on, even if the two devices are on different networks.
- The iPhone app and Mac app must agree on the activity type, and for native apps they must come from the same developer team. If they do not, no offer appears.
Web page fallback
Some apps have an iPhone version but no Mac version, or the other way around. An app can attach a web URL to its activity. If the receiving device does not have a matching app, Handoff can open that URL in the default browser instead. This is why a document opened in an app on the iPhone sometimes appears as a web page on the Mac. It also explains why the result looks different from what you expected: you are seeing the web version, not a native copy of the app.
Edge cases
- Different apps on each side. Handoff requires the receiving app to claim the activity type. Installing a Mac app with a similar name does not help unless it is the same developer's counterpart app.
- Multiple Macs or iPhones. Each nearby device can send offers, and each device can show several. Pick the one with the right label. The label shows the name of the source device.
- Managed devices. A device enrolled in a company or school management system can have Handoff restricted by policy. If the setting is missing or turned off and you cannot change it, ask the administrator.
- Dock settings. The Dock icon is the most visible offer on the Mac, but Command-Tab shows it too. If you cannot find it in the Dock, check Command-Tab before concluding that nothing arrived.
- Sleeping or locked devices. A locked iPhone does not advertise a new activity. Unlock it and use the app again.
- Third-party apps. If Safari works but another app does not, the other app probably does not support Handoff. Check whether it advertises support, or whether the developer adopted
NSUserActivityat all.
Troubleshooting Handoff
Work from the most common cause to the least common.
- Confirm the setting on both devices. On the Mac, open System Settings, choose General, then AirDrop & Handoff, and check "Allow Handoff between this Mac and your iCloud devices". On the iPhone, open Settings, then General, then AirPlay & Handoff, and check Handoff. Menu names vary slightly between OS versions.
- Confirm the Apple Account. Open the account page in Settings on each device. The account must match. A second account used only for the App Store does not count.
- Confirm Bluetooth and Wi-Fi. Both must be on in the device settings, not only the Control Center. Turning Wi-Fi off from Control Center on an iPhone can leave the radio partially available, so use the Settings app to be sure.
- Confirm proximity. Bring the devices within a few meters. Bluetooth range indoors is shorter than the nominal figure.
- Refresh the state. Switch the Handoff setting off and on again on both devices. If that fails, turn Bluetooth off and on. Restart both devices if needed.
- Test with Safari. Safari is the most reliable test app. If Safari works and your own app does not, the issue is the app's support.
- Sign out and back in. As a last resort, sign out of the Apple Account on the failing device and sign in again. Note that signing out can remove local iCloud data from that device, so make sure it is synced first.
For developers: where the activity comes from
A Handoff offer exists only because an app created an NSUserActivity, marked it eligible for Handoff, and made it current. The receiving app then handles that same activity type. A later chapter walks through the Swift code. For now, remember the diagnostic implication: if the activity type strings differ between the two apps, or the receiving app does not list the type in its NSUserActivityTypes entry, no offer will appear.
Summary of when to use Handoff
Use Handoff when you want to keep your place in an app, such as a web page, a draft message, or a document. Use Universal Clipboard when you have a piece of text or an image to move. Use AirDrop when you have a file to send and want a copy on the other device.
Exercise
You start a note on your iPhone and expect a Notes icon to show in your Mac's Dock, but nothing appears. Name three settings or conditions you would check, in order, and say which one makes the offer disappear even when everything else is correct.
Show answer
Check (1) that Handoff is turned on in both the Mac's General > AirDrop & Handoff setting and the iPhone's General > AirPlay & Handoff setting, (2) that both devices use the same Apple Account, and (3) that Bluetooth and Wi-Fi are on and the devices are close. Even when all of these are correct, the offer disappears if you stop using the activity, switch to something else on the iPhone, lock the iPhone, or move out of range, because Handoff only offers the most recent activity from a nearby device.
Exercise
Handoff works from your iPhone to your Mac in Safari, but a third-party app never shows an offer. What is the most likely cause, and what two things must be true in the app for Handoff to work?
Show answer
The third-party app probably does not support Handoff. For support, the sending app must create an NSUserActivity marked as eligible for Handoff and make it current, and the receiving app must handle the same activity type (declared in NSUserActivityTypes in its Info.plist) and come from the same developer team.