<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/OpenURLAction/Result",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13OpenURLActionV6ResultV"
  },
  "title" : "OpenURLAction.Result"
}
-->

# OpenURLAction.Result

The result of a custom open URL action.

```
struct Result
```

## Overview

If you declare a custom [`OpenURLAction`](/documentation/SwiftUI/OpenURLAction) in the [`Environment`](/documentation/SwiftUI/Environment),
return one of the result values from its handler.

- Use [`handled`](/documentation/SwiftUI/OpenURLAction/Result/handled) to indicate that the handler opened the URL.
- Use [`discarded`](/documentation/SwiftUI/OpenURLAction/Result/discarded) to indicate that the handler discarded the URL.
- Use [`systemAction`](/documentation/SwiftUI/OpenURLAction/Result/systemAction) without an argument to ask SwiftUI
  to open the URL with the system handler.
- Use [`systemAction(_:)`](/documentation/SwiftUI/OpenURLAction/Result/systemAction(_:)) with a URL argument to ask SwiftUI
  to open the specified URL with the system handler.

You can use the last option to transform URLs, while
still relying on the system to open the URL. For example,
you could append a path component to every URL:

```
.environment(\.openURL, OpenURLAction { url in
    .systemAction(url.appendingPathComponent("edit"))
})
```

## Topics

### Getting the results

[`discarded`](/documentation/SwiftUI/OpenURLAction/Result/discarded)

The handler discarded the URL.

[`handled`](/documentation/SwiftUI/OpenURLAction/Result/handled)

The handler opened the URL.

[`systemAction`](/documentation/SwiftUI/OpenURLAction/Result/systemAction)

The handler asks the system to open the original URL.

[`systemAction(_:)`](/documentation/SwiftUI/OpenURLAction/Result/systemAction(_:))

The handler asks the system to open the modified URL.

## Relationships

### Conforms To

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

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

---

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)