About Disk Arbitration

Describes how to use the Disk Arbitration framework to detect new disks and manipulate mounting behavior.

At a Glance

At a high level, you can use the Disk Arbitration framework to:

Receive notification of disk-related events (disk ejection, for example) and participate in the arbitration process ( preventing disk ejection, for example).

Obtain information about disks and manipulate disks (requesting that a disk be ejected, for example).

Important: If you are working with burned optical media, you do not need to use the Disk Arbitration framework. The Disc Recording framework itself provides APIs that let you register for optical media notification and claim optical media for your app’s use.

App Sandbox Note: This document is primarily intended for utility-style applications that are not sandboxed. If your app is sandboxed, you can still register for notification about disks appearing and disappearing, but your ability to usefully take advantage of those notifications is fairly limited unless you have a security-scoped bookmark to a file that appears on the newly inserted media.

Working with Disk Arbitration Session Objects

With session objects, you can receive notification when a disk appears, a mount or unmount occurs, or a disk disappears. You can also register an approval callback to block those operations.

For example, your app might register for notification when a disk appears, and if the disk matches a specific GUID, it might automatically make a backup copy of specific files on that external disk.

Relevant Chapter: Using Disk Arbitration Notification and Approval Callbacks

Working with Disk Objects

A disk object represents a particular disk or partition. You can eject it, obtain information about it, or mount and unmount the associated volume or volumes. But first, you must obtain an object corresponding to a particular disk.

Relevant Chapter: Manipulating Disks and Volumes

Next

Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-09-17