A workspace that can launch other apps and perform a variety of file-handling services.
- macOS 10.0+
There is one shared
NSWorkspace object per app. You use the class method
shared to access it. For example, the following statement uses an
NSWorkspace object to request that a file be opened in the TextEdit app:
You can use the workspace object to:
Open, manipulate, and get information about files and devices.
Track changes to the file system, devices, and the user database.
Get and set Finder information for files.
Table 1 describes keys for an
NSDictionary object containing information about an app. This dictionary is returned by
launched, and is also provided in the
NSWorkspace notifications for app launch and termination.
Note that these constants are considered legacy.
The full path to the app, as a
The app's name, as an
The app’s bundle identifier, as an
The app's process ID, as an
The high long of the process serial number (PSN), as an
The low long of the process serial number (PSN), as an