---
title: "value(for:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/attributescopes/foundationattributes/linkattribute/value(for:)"
---

# value(for:)

Returns the URL value of the specified object.

## Declaration

```swift
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

Return Value A URL value.

## See Also

### Accessing the Attribute Name and Value

- [name](foundation/attributescopes/foundationattributes/linkattribute/name.md)
- [AttributeScopes.FoundationAttributes.LinkAttribute.Value](foundation/attributescopes/foundationattributes/linkattribute/value.md)
- [objectiveCValue(for:)](foundation/attributescopes/foundationattributes/linkattribute/objectivecvalue(for:).md)
- [AttributeScopes.FoundationAttributes.LinkAttribute.ObjectiveCValue](foundation/attributescopes/foundationattributes/linkattribute/objectivecvalue.md)
