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

# objc_copyClassList(_:)

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

## Declaration

```swift
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

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

## See Also

### Obtaining Class Definitions

- [objc_getClassList(_:_:)](objectivec/objc_getclasslist(_:_:).md)
- [objc_lookUpClass(_:)](objectivec/objc_lookupclass(_:).md)
- [objc_getClass(_:)](objectivec/objc_getclass(_:).md)
- [objc_getRequiredClass(_:)](objectivec/objc_getrequiredclass(_:).md)
- [objc_getMetaClass(_:)](objectivec/objc_getmetaclass(_:).md)
