AirPods: Automatically and instantly switch between iPhone, Mac & iPad

13 April 2020, 05:19

Feature head image

The instructions below detail two tricks:

  • iPhone/iPad: If you open an app you normally use with AirPods, your iPhone or iPad will automatically connect to your AirPods if they’re in your ears – essentially, “stealing” them from whatever they’re currently connected to (for example, your Mac). No need to manually select and connect to them!
  • Mac (any kind): You can create an app that, once clicked, connects your Mac instantly to the AirPods if they’re in your ears, again “stealing” them from whatever they’re already connected to. Although not automatic, this makes connecting a one-click process – which helps save sanity by avoiding the need to click through menus or open several apps.

You’ll need around five minutes to complete the steps outlined below. Built-in Mac and iOS tools are used. No need to pay for anything extra.

For these steps I’m indebted to three individuals who originated the concepts. Below I write everything up for accuracy and ease of implementation, plus add illustrative screenshots. First is Reddit user MINGA64, who appears to have originated the instructions for iOS. The second is Josh Johnson, who appears to have originated the instructions for the Mac. The third is Andrew Burns, who appears to have originated the AppleScript code.

Automatic AirPods switching on iPhone or iPad

Here are the instructions for automatic AirPods switching on an iOS device.

  1. Connect the AirPods to your phone or iPad in the usual way.

    Main feature illustration
  2. Open the Shortcuts app on your iPhone (or iPad).

    Main feature illustration
  3. Tap the Automation icon at the bottom middle, then the “Create Personal Automation” button.

    Main feature illustration
  4. Scroll to the bottom of the list that appears and select “Open App”.

    Main feature illustration
  5. Tap “Choose” alongside the App heading, and then tap the apps in question so a checkmark appears alongside (e.g. the Music app, the Phone app, Zoom, Microsoft Teams, Amazon Music, and so on – if your list includes games, this step could take a while! If you miss one out you can return to this step and edit the list to add others).

    Main feature illustration
  6. Tap “Done” at the top right, and then “Next” at the top right.

    Main feature illustration
  7. Tap “Add Action”, and then tap “Scripting” – the icon that appears to be an X.

    Main feature illustration
  8. Scroll down to “Set Playback Destination”, and tap it.

    Main feature illustration
  9. In the next screen, tap “iPhone” (or iPad) and then tap the entry for your AirPods. If you don’t see AirPods appear, connect them again to your iPhone or iPad.

    Main feature illustration
  10. Tap “Next” at the top right.
  11. IMPORTANT: Tap the switch alongside “Ask Before Running” so it’s deactivated. Tap “Don’t Ask” in the warning dialog box that appears.

    Main feature illustration
  12. Tap “Done” at the top right. Here’s what you should end-up seeing:

    Main feature illustration

And that’s it! You can close the Shortcuts app (it doesn’t need to be open for this to work), and give your new trick a try-out by connecting your AirPods to your Mac (or another device) and then opening one of the apps you specified. The AirPods will connect immediately once the app is opened, or you switch to it, or even if you wake your iPhone or iPad to that particular app.

There is a slightly irritating side effect with this trick, which is that a notification appears each time your AirPods autoconnect. You can’t turn this off (Apple clearly doesn’t want you to), but you can just swipe it out of the way each time. Don’t tap it though, because that will just open the Shortcuts app again. This tip over at Reddit appears to be a way to turn off notifications for the Shortcuts app, but I haven’t tried it.

Quick AirPod switching on the Mac

As mentioned, on the Mac an easy solution is to create your own app using Script Editor that switches over the AirPods whenever it’s run. You can then add this to your Dock and click it when needed. This is easier than the several clicks required to switch the AirPods over to your Mac normally, and is therefore as easy to use as some of the commercial apps that make similar promises.

These instructions work on any Mac you use with your AirPods – MacBook, MacBook Pro, MacBook Air, iMac, iMac Pro, Mac Pro etc.

  1. Open System Preferences, click the Bluetooth icon, and ensure there’s a check alongside “Show Bluetooth in Menu Bar”. Close System Preferences following this.

    Main feature illustration
  2. Open Script Editor (formerly called AppleScript Editor), which you’ll find in the Utilities folder of the Applications list.

    Main feature illustration
  3. Click “New Document”.

    Main feature illustration
  4. Copy and paste into the Script Editor window all the code at this link.

    Main feature illustration
  5. Find out how your Mac refers to your AirPods. You can find this on the Bluetooth menu. It’ll probably be your name, followed by AirPods. Mine are called “Keir’s AirPods”, for example.

    Main feature illustration
  6. Open Text Edit, which you’ll find in the Applications list.
  7. Type in to Text Edit how your Mac refers to your AirPods. I typed “Keir’s AirPods”. Copy the text you’ve just typed.

    Main feature illustration
  8. Go back to the Script Editor window, tap Cmd+F, and type Jared’s AirPods. This will show the text you need to replace with the text you’ve just copied. It’s important you do these weird steps of typing, copying and pasting. Don’t type this straight into the Script Editor window because the wrong type of apostrophe will be used, and that will mean none of this will work!

    Main feature illustration
  9. Click File > Save in the Script Editor window. Navigate to the Applications list.
  10. In the File Format dropdown list, select Application. In the filename field, type AirPods Connect. Then click the Save button.

    Main feature illustration
  11. Find the new app you’ve created in the Application list of Finder. Select it, then tap Cmd+I.

    Main feature illustration
  12. Use Google Images to search for “AirPods icon” and find one you like the look of. Open it for viewing, then right-click it and select Copy Image.

    Main feature illustration
  13. Back in the View Info window of your new app, click the icon at the top left so it has a blue outline, then tap Cmd+V. This should use the icon you just copied for the new app. Close the View Info window.

    Main feature illustration
  14. Drag your new app from the Applications list to the Dock. You can close Script Editor if you haven’t already.

    Main feature illustration
  15. Click your new app. Aha! You’ll see a series of error messages, and it won’t work first time. Close the error messages by clicking OK, and then in the one entitled “Accessibility Access”, click the “Open System Preferences” button.

    Main feature illustration
  16. System Preferences will open. Click the padlock icon at the bottom left if everything is greyed out, and enter your login password when prompted. Then look for AirPods Connect in the list, and ensure there’s a check alongside it. You can now close System Preferences.

    Main feature illustration

In future you just click the app icon in the Dock to instantly connect to your AirPods. You might see the Bluetooth menu pop-up briefly. You can ignore it. The script/app quits as soon as it’s finished, which is a split second after you click it.

Leave a comment...

 
---