---
title: "object_getClassName(_:)"
framework: objectivec
role: symbol
role_heading: Function
path: "objectivec/object_getclassname(_:)"
---

# object_getClassName(_:)

Returns the class name of a given object.

## Declaration

```swift
func object_getClassName(_ obj: Any?) -> UnsafePointer<CChar>
```

## Parameters

- `obj`: An Objective-C object.

## Return Value

Return Value The name of the class of which obj is an instance.

## See Also

### Working with Instances

- [object_getIndexedIvars(_:)](objectivec/object_getindexedivars(_:).md)
- [object_getIvar(_:_:)](objectivec/object_getivar(_:_:).md)
- [object_setIvar(_:_:_:)](objectivec/object_setivar(_:_:_:).md)
- [object_getClass(_:)](objectivec/object_getclass(_:).md)
- [object_setClass(_:_:)](objectivec/object_setclass(_:_:).md)
