<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/MassFormatter/getObjectValue(_:for:errorDescription:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMassFormatter(im)getObjectValue:forString:errorDescription:"
  },
  "title" : "getObjectValue(_:for:errorDescription:)"
}
-->

# getObjectValue(_:for:errorDescription:)

This method is not supported for the `NSMassFormatter` class.

```
func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool
```

## Parameters

`obj`

An output parameter. If overridden, this parameter should contain the object created from the provided string.

`string`

A string representation of the object.

`error`

An output parameter. If overridden, this parameter should contain a description of any errors that occur. If you do not want to receive error messages, set this parameter to `NULL`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the conversion from string was successful; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

You can override this method in a subclass. For more information, see [`Formatter`](/documentation/Foundation/Formatter).

## See Also

[`getObjectValue(_:for:errorDescription:)`](/documentation/Foundation/Formatter/getObjectValue(_:for:errorDescription:))

The default implementation of this method raises an exception.



---

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)