<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentViewController/LaunchOptions-swift.class/primaryAction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentViewControllerLaunchOptions(py)primaryAction"
  },
  "title" : "primaryAction"
}
-->

# primaryAction

The launch scene’s primary action.

```
@NSCopying var primaryAction: UIAction? { get set }
```

## Discussion

Set this property to customize the primary action’s button in the document launch scene. If you don’t set this property, the system adds a default Create Document button to the title view.

---

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)