Ios Handoff Requirements

Move Easily between Devices with Handoff

On an iOS device, tap Settings Bluetooth and turn on the Bluetooth switch ⑤. ⑤ On your iOS device, turn on the Handoff switch. Make sure Macs and iOS devices are all signed in to iCloud with the same Apple ID. On the Mac, you can check this in System Preferences iCloud. Handoff requirements. Before we examine each of its elements, let’s be sure that you can actually use Handoff. To take advantage of Handoff you need a MacBook Air, MacBook Pro, iMac, or Mac mini.

Use Handoff to move seamlessly between your Apple devices. For instance, say you start to write an email message on your Mac and then have to rush out the door for work. While you wait at the train station, finish composing the message on your iPhone. Or, say you start reading an article in Safari on your iPad and then want to finish on your iMac at the office. Apple says Handoff will let you pick up where you left off when using Mail, Safari, Pages, Numbers, Keynote, Maps, Messages, Reminders, Calendar, Contacts, and some third-party apps in Yosemite and iOS 8 .

① When you get back to your Mac, click the activity icon in your Dock to finish the email message you started on your iPhone or iPad.

The good news is that Handoff is truly convenient; the bad news is it may not work for you. Its hardware requirements are far more stringent than Yosemite and iOS 8’s.

Handoff Requirements

According to Apple, these devices can take advantage of Handoff :

Handoff

② Lucky enough to have more than one Handoff-capable Mac? They can share, too.

  • iOS: Any iPhone, iPad, or iPod touch that can run iOS 8 and that also has a Lightning connector (that excludes the iPad 2, iPad 3, and iPhone 4s)
  • iMac: 2012 or newer
  • MacBook Air: 2012 or newer
  • MacBook Pro: 2012 or newer
  • Mac mini: 2012 or newer
  • Mac Pro: Late 2013 or newer

Yes, that means if your Mac, iPhone, or iPad is more than a few years old, you are out of luck.

If your Mac is on this list, but doesn’t seem to work, choose Apple  > About This Mac. Click System Report and then select Bluetooth in the sidebar.

What you want to see is: Bluetooth Low Energy Supported: Yes; Handoff Supported: Yes. If you see the word No or don’t see a line for Handoff in System Report at all, your Mac does not support Handoff.

③ Does your Mac really support Handoff? Go to Apple  > About This Mac, click on System Report, and then select Bluetooth. You want to see what’s shown here (circled).

Get Set Up

  1. Turn on Bluetooth. On the Mac, go to System Preferences > Bluetooth and click the Turn Bluetooth On button . On an iOS device, tap Settings > Bluetooth and toggle the switch to On.

    ④ Click the Turn On Bluetooth button to enable Bluetooth on your Mac.

  2. Make sure Macs and iOS devices are all signed in to iCloud with the same Apple ID. On the Mac, you can check this in System Preferences > iCloud. On an iOS device, tap Settings > iCloud.
  3. Turn on Handoff on the Mac by going to System Preferences > General and checking the Allow Handoff between This Mac And Your iCloud Devices box .

    ⑤ On your Mac, make sure the Allow Handoff Between This Mac And Your iCloud Devices option (circled) is checked.

  4. Turn on Handoff on an iOS device by tapping General > Handoff & Suggested Apps and toggling the Handoff switch to on.

Switch Devices

When you’re ready to move from one device to another, leave the app you’re using in the foreground. Then:

  • Check that your Mac and iOS device (or two Macs) are within Bluetooth range of each another—no more than 33 feet (roughly 10 meters) apart. It shouldn’t matter if your iPhone or iPad is inside a pocket or purse.
  • If you’re moving to an iPad, iPhone, or iPod touch, an activity icon for the app you were working on appears at the bottom-left edge of the Lock screen . Swipe up from this.

    ⑥ Your iPhone displays a small activity icon—in this case Safari (circled)—at the bottom of the Lock screen. Swipe up from this icon to open the Web page you were viewing.

    Or, if your iOS device is already unlocked, double-press the Home button to open the multitasking screen. If it doesn’t open to Handoff, swipe right to the Handoff view.

  • If you’re moving to a Mac, an activity icon for the app (with a tiny device icon on it) appears in the Dock . Click this to jump to your spot.

    ⑦ On your Mac, you see an activity icon in the Dock, like this one for Maps.

    Or, if you like to keep your hands on the keyboard, when the activity icon appears in the Dock, press Command-Tab to reveal the Application Switcher. Hold the Command key and press Tab until the activity icon highlights. Release the keys to jump to your spot.

Turn Handoff Off

To disable Handoff on your iOS devices, tap Settings > General > Handoff & Suggested Apps and then toggle the Handoff switch to off.

To disable Handoff on your Mac, go to System Preferences > General, and uncheck the Allow Handoff between This Mac and Your iCloud Devices box.

Copyright © 2014, Sawyer McFarland Editing. All rights reserved.

Please enable JavaScript to view the comments powered by Disqus.comments powered by Disqus

Handoff is a neat feature that was introduced in iOS 8 and macOS (then OS X) v10.10. This capability allows an app to pass data across macOS and iOS devices so that a task started on one device can be completed on another device. The difference between this and continuing an activity by saving a file to a place like iCloud and resuming the activity on another device is context. Meaning that when you use handoff, unlike other methods, the user of your app will be in the exact same location, when the app is opened on a second device, as they were on the first device.
An example of this behavior is a user typing in your app on a screen that takes a few steps to get to, continuing an app on the second device will automatically take that user to the same screen where they will see the same text and even have the keyboard visible and ready for them to continue typing. The alternative is for the user to wait for the data to sync between all devices then navigating to the same place in the app and tapping on the text box to make the keyboard show. This may sound trivial but the user’s experience is much better when the app knows what behavior is desired and automatically does as much of the work as possible.

Introduction

In this tutorial, we will walk through setting up handoff on both iOS and macOS. We are going to use a simple app that stores time stamps. On iOS there is a button to allow the user to create time stamps while the macOS app will generate a new time stamp every time the app is launched. Both apps use a master-detail controller to show the time stamp on the details screen when one is selected on the master side. When we are finished, any time stamp that is being viewed on the details side of the screen will be available for another app to open and view, even if that time stamp does not exist on the other device. The starter project can be found on GitHub.

Requirements

We will implement Handoff on both platforms simultaneously and will re-use as much of the code as possible so that the two implementations are nearly identical. Please note that for handoff to work between a macOS app and an iOS app, the developer’s Team ID must be the same. Also, the mac app must be signed. In the project settings under the macOS app target on the “General” tab, look for the “Signing” section as seen here.

If your app is a document-based app, Handoff is automatically supported. Because of this, we will not look at document-based apps. Rather, we will implement the manual way of supporting Handoff. To do this, we will handle call backs in the AppDelegate and we will manually create and update NSUserActivity objects.

Getting Started With Handoff

Enable Handoff Ios

The first step is to declare the activities that can be continued by an app. This lets the OS know that if another device is broadcasting an NSUserActivity of the same type, it can be continued using this app. So, in the Info.plist file, make a new entry where the key is NSUserTypes and the value is an array of strings. Each string represents one activity and should be in reverse DNS style formatting. For example, our activity will be “com.chariotsolutions.ListHandoff.viewTimestamp”, as seen in the following image.

Working with NSUserActivity

The next step is to create the User Activity (NSUserActivity). The User Activity is used to describe what actions can be passed to another device. We are only going to pass the viewing of an individual timestamp. However, we could create a separate NSUserActivity for viewing a list or for editing a timestamp if we wanted to support those activities. Since all of our user interaction is filtered through ListTableDataSource, and this code is shared by both iOS and macOS, this is the perfect place to manage the NSUserActivity objects. Therefore, in ListTableDataSource we are going to add a property to hold the NSUserActivity:

The currentActivity will then be managed as the user selects Events in the table view. Continuing, add a method to handle user selection before the event is passed back to the delegate:

Ios Handoff Windows

Next, we will update the mac app to call this by opening ListTableDataSource+macOS.swift, which has an extension of ListTableDataSource that is available in the macOS app only, and replace line 80 with:

Ios Handoff Requirements Vs

In addition, the iOS app needs to be updated. Currently, selecting a UITableViewCell is automatically transitioning the app to the next screen so the user interaction is not being handled at all. However, we will fix this by implementing the following method in ListTableDataSource+iOS.swift, which is an extension of ListTableDataSource that is available in the iOS app only:

Now, any time the user selects a timestamp from the list, we will know about it. Although, we still need to update the app on the iPhone so that when the user presses the back button to return to the list, the user activity gets deselected. To do so, open the iOS app’s MasterViewController class, locate viewWillAppear(_:) and add the following just before the call to super.

Continuing on, we can update userDidSelect(event:notifyDelegate:) to create, update or destroy the user activity.

In the previous code, if the event is not nil, we check to see if a user activity already exists. If it does, we update the user data so that it is current. But, if an activity does not exist, then we create the new user activity. If, on the other hand, the event is nil, then we invalidate the activity and nil it out to free up the memory. We must include currentActivity?.becomeCurrent() in order for the activity to be the one published by the OS as a handoff activity.
Until now, the iOS app’s MasterViewController has had no need to know about event selections because the navigations happen automatically. However, during handoff, there is no user interaction so we must provide a way for the MasterViewController to navigate properly when handoff occurs. Consequently, we must make two changes. First, in viewDidLoad() set the delegate on the data source.

Second, implement the protocol such that when an event is selected, the index path for that event is determined, that index path is selected on the table view and, finally, the segue to show the details view is programmatically initiated. To do this, create an extension to the iOS app’s MasterViewController that implements ListTableDataSourceDelegate.

Note that this method is already implemented in the macOS app because that app does not automatically transition to the details view on user interaction. Therefore, this behavior was already set up so that we could handle user interaction appropriately.

Continuing An Activity With Handoff

At this point, the part of the app that publishes an activity is complete and if user activities are continued, the UI will transition to the details view. The user activities that are ready for Handoff will be automatically advertised to near-by devices. Next, we will set up the apps to continue an activity by handling events that are passed to the delegate.

In the iOS app’s AppDelegate we need to add two methods. The first tells iOS that it, not the app, should handle notifying the user about an activity, if necessary. For example, if the data is taking too long to transfer from one device to the next. The second handles the user activity once the data has been received.

The final part of the iOS app is to handle failures. Naturally, we want to gracefully notify the user that the activity is not able to be continued so that they are not waiting unnecessarily. But, if we do not implement this method, iOS will notify the user for us. Add the following to AppDelegate.

Switching back to the macOS app, we need to implement the AppDelegate methods. Again, there are three methods to be implemented. Similar to the iOS app, the first method will tell the OS to handle notifying the user of activity that should be reported. The second method handles continuing an activity. Finally, the third method handles gracefully notifying the user when something goes wrong.

That is it! runt he app on your iPhone, iPad and/or Mac and enjoy Handoff! The completed project can be found on GitHub.

Debugging Handoff

What Is Handoff On Ipad

There are a couple things that might be helpful to know if this doesn’t work for you. First, as mentioned before, the macOS app must be signed. Second, Handoff makes sure the devices are close by each other so keep the devices close. There are also a few requirements for your device’s set up. Both Bluetooth and Wi-Fi must be turned on. If the devices are connected to the same Wi-Fi network that is even better, although it is not technically required. Each device also has to have Handoff turned on. On both iOS and macOS devices, this setting is in Settings under “General”.