<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/LaunchOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSWorkspaceLaunchOptions"
  },
  "title" : "NSWorkspace.LaunchOptions"
}
-->

# NSWorkspace.LaunchOptions

Constants specifying how you want to launch an app

```
struct LaunchOptions
```

## Topics

### Options

[`NSWorkspaceLaunchAndPrint`](/documentation/AppKit/NSWorkspace/LaunchOptions/andPrint)

Print items instead of opening them.

[`NSWorkspaceLaunchWithErrorPresentation`](/documentation/AppKit/NSWorkspace/LaunchOptions/withErrorPresentation)

Display an error panel to the user if a failure occurs.

[`NSWorkspaceLaunchInhibitingBackgroundOnly`](/documentation/AppKit/NSWorkspace/LaunchOptions/inhibitingBackgroundOnly)

Causes launch to fail if the target is background-only.

[`NSWorkspaceLaunchWithoutAddingToRecents`](/documentation/AppKit/NSWorkspace/LaunchOptions/withoutAddingToRecents)

Do not add the app or documents to the Recents menu.

[`NSWorkspaceLaunchWithoutActivation`](/documentation/AppKit/NSWorkspace/LaunchOptions/withoutActivation)

Launch the app but do not bring it into the foreground.

[`NSWorkspaceLaunchAsync`](/documentation/AppKit/NSWorkspace/LaunchOptions/async)

Launch the app and return the results asynchronously.

[`NSWorkspaceLaunchAllowingClassicStartup`](/documentation/AppKit/NSWorkspace/LaunchOptions/allowingClassicStartup)

Start up the Classic compatibility environment, if it is required by the app.

[`NSWorkspaceLaunchPreferringClassic`](/documentation/AppKit/NSWorkspace/LaunchOptions/preferringClassic)

Force the app to launch in the Classic compatibility environment.

[`NSWorkspaceLaunchNewInstance`](/documentation/AppKit/NSWorkspace/LaunchOptions/newInstance)

Create a new instance of the app, even if one is already running.

[`NSWorkspaceLaunchAndHide`](/documentation/AppKit/NSWorkspace/LaunchOptions/andHide)

Tell the app to hide itself as soon as it finishes launching.

[`NSWorkspaceLaunchAndHideOthers`](/documentation/AppKit/NSWorkspace/LaunchOptions/andHideOthers)

Hide all apps except the newly launched one.

[`NSWorkspaceLaunchDefault`](/documentation/AppKit/NSWorkspace/LaunchOptions/default)

Launch the app asynchronously and launch it in the Classic environment, if required.

### Initializers

[`init(rawValue:)`](/documentation/AppKit/NSWorkspace/LaunchOptions/init(rawValue:))

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`OptionSet`](/documentation/Swift/OptionSet)

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)