Framework

ImageCaptureCore

Overview

ImageCaptureCore enables your app to browse for media devices and control them programatically.

Diagram showing a macOS device connected by cables to a camera and a scanner, and an iPadOS device connected by cable to a camera.

Using ImageCaptureCore, your app can:

  • Discover connected cameras and scanners

  • View and modify the folders, files, and metadata on a connected camera

  • Take photos directly on a connected camera using tethered capture

  • Perform overview scans and scans on a connected scanner

Configuring Tethered Capture and Photo Import

To import pictures and tether from a macOS app, you first need to enable the Hardened Runtime capability in Xcode, and then add the Photos Library Entitlement.

Before you can tether from an iOS app, you need to tell the user why the app is requesting access to an external camera. Add the NSCameraUsageDescription key to your Info.plist file with a description of your intended use.

Topics

Essentials

class ICDeviceBrowser

An object for finding digital cameras and scanners.

Photos Library Entitlement

A Boolean value that indicates whether the app has read-write access to the user's Photos library.

Key: com.apple.security.personal-information.photos-library
property list key NSCameraUsageDescription

A message that tells the user why the app is requesting access to the device’s camera.

Name: Privacy - Camera Usage Description

Cameras

class ICCameraDevice

An object that represents a camera.

protocol ICCameraDeviceDelegate

Methods for detecting cameras, getting metadata and thumbnails, handling access and capability changes, and performing other actions on connected cameras.

class ICCameraItem

An abstract class that represents a camera item.

class ICCameraFile

An object that represents a file on a camera.

class ICCameraFolder

An object that represents a folder on a camera.

Scanners

class ICScannerDevice

An object that represents a scanner.

protocol ICScannerDeviceDelegate

Methods for determining availability, selecting a functional unit, and performing scans on connected scanners.

Scanner Configuration

Examine a scanner’s functional units and features.

Errors

struct ICReturn

An error returned from ImageCaptureCore.

struct ICLegacyReturn

A legacy error returned from ImageCaptureCore.

struct ICReturnConnectionError

A connection error returned from ImageCaptureCore.

struct ICReturnDownloadError

A download error returned from ImageCaptureCore.

struct ICReturnMetadataError

A metadata error returned from ImageCaptureCore.

struct ICReturnObjectError

An object error returned from ImageCaptureCore.

struct ICReturnPTPDeviceError

A PTP device error returned from ImageCaptureCore.

struct ICReturnThumbnailError

A thumbnail error returned from ImageCaptureCore.