<!--
{
  "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/ObjectiveCConvertibleAttributedStringKey/objectiveCValue(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation40ObjectiveCConvertibleAttributedStringKeyP15objectiveCValue3for0bH0Qz5ValueQz_tKFZ"
  },
  "title" : "objectiveCValue(for:)"
}
-->

# objectiveCValue(for:)

Returns an Objective-C typed value for a given value of this key’s type.

```
static func objectiveCValue(for value: Self.Value) throws -> Self.ObjectiveCValue
```

## Parameters

`value`

The value to convert.

## Return Value

`value`, expressed as the Objective-C type defined by [`ObjectiveCValue`](/documentation/Foundation/ObjectiveCConvertibleAttributedStringKey/ObjectiveCValue).

---

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)