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

# class_getImageName(_:)

Returns the name of the dynamic library a class originated from.

## Declaration

```swift
func class_getImageName(_ cls: AnyClass?) -> UnsafePointer<CChar>?
```

## Parameters

- `cls`: The class you are inquiring about.

## Return Value

Return Value A C string representing the name of the library containing the cls class.

## See Also

### Working with Libraries

- [objc_copyImageNames(_:)](objectivec/objc_copyimagenames(_:).md)
- [objc_copyClassNamesForImage(_:_:)](objectivec/objc_copyclassnamesforimage(_:_:).md)
