<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/objc_getRequiredClass(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@objc_getRequiredClass"
  },
  "title" : "objc_getRequiredClass(_:)"
}
-->

# objc_getRequiredClass(_:)

Returns the class definition of a specified class.

```
func objc_getRequiredClass(_ name: UnsafePointer<CChar>) -> AnyClass
```

## Parameters

`name`

The name of the class to look up.

## Return Value

The Class object for the named class.

## Discussion

This function is the same as [`objc_getClass(_:)`](/documentation/ObjectiveC/objc_getClass(_:)), but kills the process if the class is not found.

This function is used by ZeroLink, where failing to find a class would be a compile-time link error without ZeroLink.

---

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)