<!--
{
  "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" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/value(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO0A10AttributesV04LinkB0O5value3forAA3URLVSo8NSObjectC_tKFZ"
  },
  "title" : "value(for:)"
}
-->

# value(for:)

Returns the URL value of the specified object.

```
static func value(for object: NSObject) throws -> URL
```

## Parameters

`object`

An <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class> to retrieve a URL value from.

## Return Value

A URL value.

---

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)