<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWindowSceneDelegate/windowScene(_:performActionFor:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIWindowSceneDelegate(im)windowScene:performActionForShortcutItem:completionHandler:"
  },
  "title" : "windowScene(_:performActionFor:completionHandler:)"
}
-->

# windowScene(_:performActionFor:completionHandler:)

Asks the delegate to perform the user-selected action.

```
optional func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void)
```

## Parameters

`windowScene`

The window scene object receiving the shortcut item.

`shortcutItem`

The action selected by the user. Your app defines the actions that it supports, and the user chooses from among those actions. For information about how to create and configure shortcut items for your app, see [`UIApplicationShortcutItem`](/documentation/UIKit/UIApplicationShortcutItem).

`completionHandler`

A handler block to call after you complete the action. This block has no return value and takes the following parameter:

- succeeded: A Boolean value indicating whether you successfully completed the specified action. Specify <doc://com.apple.documentation/documentation/Swift/true> if you completed the action or <doc://com.apple.documentation/documentation/Swift/false> if you didn’t.

## Discussion

When the user selects one of your app’s shortcut items, use this method to perform the selected action. After you finish the action, execute the specified `completionHandler` block to report your success or failure in performing the action.

---

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)