photos-automation-banner
•
OS X AUTOMATION
AUTOMATOR
IWORK AUTOMATION
•

Auto-Import from a Tethered iPhone

The ability to capture images from a tethered iPhone is not currently supported by the Photos application in macOS. However, using the native user-automation support in macOS, it’s easy to create an solution for automatic import of images taken by an iPhone tethered to your Mac.

The following video details the setup and use of the tethered iPhone tools provided on this page:

Your browser does not support the video tag.

The Import Folder

The automated import workflow requires a specified folder to temporarily hold the image files downloaded from the tethered iPhone.

DO THIS ► In your home Pictures folder, create a new folder named: Tethered iPhone

The “Folder-Action” Workflow

The process of importing an image file downloaded from the tethered iPhone, will be performed by the provided Automator Folder-Action workflow.

This workflow will be “attached” to the directory you’ve identified as being the import destination in the Image Capture utility. When an image is downloaded into the attached folder, the workflow will be executed using the downloaded file to import it into the current Photos library, and then move the downloaded file into the trash (since a duplicate of it was placed into the Photos library during import).

Here’s how to install and setup the provided Automator workflow:

DO THIS ►  DOWNLOAD  the Automator folder-action workflow file. Once it has been unzipped, double-click the file to summon the installation dialog:

installing-workflow

DO THIS ► Press the “Install” button and the workflow will be moved into this directory: Home ► Library ► Workflows ► Applications ► Folder Actions and a completion dialog will be presented:

opening-workflow

DO THIS ► Press the “Done” button.

The Folder Actions Setup App

Now that you’ve installed the Automator workflow, it can assigned as a Folder Action using the Folder Actions Setup application.

DO THIS ► Type Command-Spacebar (⌘Space) to summon the Spotlight search field, and enter: “Folder Actions Setup.app” then select the app from the results list and open it.

folder-actions-setup-search

The Folder Actions Setup application is used to turn on|off the Folder Actions architecture and to assign folder action scripts or workflows to chosen folders in the Finder.

Turn on Folder Actions system-wide by selecting the checkbox labeled “Enable Folder Actions”  1  at the top left of the window.

folder-actions-setup-2

Choose a folder to attach a script or workflow to by clicking the plus button (+)  2  at the bottom left of the window. A folder picker sheet will drop down. Navigate to the Pictures folder and select the newly created import folder named “Tethered iPhone.” Once chosen, it will appear in the list  3  of currently watched folders. To choose the script or workflow to assign to the folder, click the plus button (+)  4  at the bottom center of the window, and from the drop-down sheet list, select the workflow you installed, named: Import into Photos  5  which will now appear in the list of assigned actions for the selected folder.

Quit the Folder Actions Setup application when done.

The “Button Watcher” Script

The process of triggering the importation of a taken photo into Photos is accomplished using an AppleScript “Button-Watcher” applet. This applet when launched will stay open and running in the background as long as the Image Capture application is running. If you quit Image Capture, this applet will automatically quit as well.

The applet will check for two things before importing a taken image from the iPhone:

  • Is Image Capture the frontmost application?
  • Is the “Import All” button in the Image Capture window enabeled?

If the answer to both of these question is Yes (true) then the script applet will “press” the Import All button in the Image Capture window, thereby downloading the taken photos to the chosen import folder, and triggering the Automator Folder-Action workflow to import the downloaded image files into Photos.

DO THIS ►  DOWNLOAD  the Button Watcher AppleScript applet.

The Auto-Import script applet uses the Accessibility architecture in macOS to query and control the interface of the Image Capture application. For security reasons, doing so requires approval from the user.

DO THIS ► Launch the System Preferences application and go to the Security & Privacy preference pane  1  and click the Privacy
tab  2  in the window. Select Accessibility from the category list on the left  3  and then click the lock icon  4  at the bottom left of the window and enter your administrative user name and password in the forthcoming dialog. To add the applet to the list of approved apps, click the plus sign button  5  and navigate to and select the applet in the forthcoming sheet. Once chosen, the applet will appear in the list  6 

security-accessibility

Setup Tethered iPhone Capture

Now that the automated workflow components have been installed, follow these steps to begin automatic import from your tethered iPhone:

  • Obviously, the first step is to connect your iPhone with a USB cable to your Mac. Make sure the camera app is active.
  • IMPORTANT: make sure the photo library on the iPhone is EMPTY. If you need to, DOWNLOAD or BACKUP the current images and movies, and then delete them from the iPhone prior to using it for tethered capture.
  • Launch the Image Capture utility (Applications folder). With the iPhone connected  1  select from popup menu at bottom center-left of the Image Capture window  3  the import folder you attached the Folder-Action workflow to. IMPORTANT: select the “Delete after import” checkbox  2  so that the camera will be cleared after each triggered import.
  • image-capture-setup
  • Launch the Auto-Import applet, and click the Start button. Bring Image Capture to the front by clicking in its window. You are now ready to do tethered capture.
  • IMPORTANT: As long as the Image Capture application is in the front of all other apps, the applet will continue to click the “Import All” button in the Image Capture window when it is active. If you choose to make the Photos application the frontmost app (perhaps to edit a photo), the applet will pause until you move Image Capture to the front again. If you quit Image Capture, the applet will quit automatically as well.

NEXT TOPIC: “Hot Folders”

TOPICS

  • Overview
  • Automator Quick-Start

  • Selection & Content
  • Importing Media Items
  • Import Action
  • Tethered Camera
  • Tethered iPhone
  • “Hot Folders”
  • Exporting Media Items
  • Metadata
  • Slideshow Actions

  • Scripting Overview

  • Workflow Recipes
  • Dictation Commands

DISCLAIMER

THIS WEBSITE IS NOT HOSTED BY APPLE INC.

Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. PHOTOSAUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. PHOTOSAUTOMATION.COM provides this only as a convenience to our users. PHOTOSAUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and PHOTOSAUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from PHOTOSAUTOMATION.COM and that PHOTOSAUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.