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

# objc_copyClassList(_:)

Creates and returns a list of pointers to all registered class definitions.

```
func objc_copyClassList(_ outCount: UnsafeMutablePointer<UInt32>?) -> AutoreleasingUnsafeMutablePointer<AnyClass>?
```

## Parameters

`outCount`

An integer pointer used to store the number of classes returned by this function in the list. This parameter may be `nil`.

## Return Value

A `nil` terminated array of classes. You must free the array with `free()`.

## Discussion

---

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)