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


func class_getImageName(_ cls: AnyClass?) -> UnsafePointer<Int8>?



The class you are inquiring about.

Return Value

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

See Also

Working with Libraries

func objc_copyImageNames(UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<UnsafePointer<Int8>>

Returns the names of all the loaded Objective-C frameworks and dynamic libraries.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software