---
title: "property_copyAttributeValue(_:_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 4.3+, iPadOS 4.3+, Mac Catalyst 13.1+, macOS 10.7+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/property_copyattributevalue(_:_:)"
---

# property_copyAttributeValue(_:_:)

Returns the value of a property attribute given the attribute name.

## Declaration

```swift
func property_copyAttributeValue(_ property: objc_property_t, _ attributeName: UnsafePointer<CChar>) -> UnsafeMutablePointer<CChar>?
```

## Parameters

- `property`: The property whose value you are interested in.
- `attributeName`: A C string representing the name of the attribute.

## Return Value

Return Value The value string of the attributeName attribute, if one exists in property; otherwise, nil. You must free the returned value string with free().

## See Also

### Working with Properties

- [property_getName(_:)](objectivec/property_getname(_:).md)
- [property_getAttributes(_:)](objectivec/property_getattributes(_:).md)
- [property_copyAttributeList(_:_:)](objectivec/property_copyattributelist(_:_:).md)
