Communicating with the Workspace

Cocoa applications benefit from bidirectional communication with the Mac OS X applications that provide the user’s workspace. The term workspace refers to the combination of the Desktop, Dock, Finder, and operating system services that collectively implement the user’s view of the computer. Cocoa applications are notified when changes to the workspace are made. For example, Cocoa applications are informed when the computer is about to be powered off, when applications are launched, and when network volumes are mounted. Cocoa applications can ask the workspace to perform operations such as copying files, launching applications, and selecting files in Finder.

NSWorkspace Class

A single shared instance of the ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.