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

# objc_copyImageHeaders(_:)

Returns the Mach headers of all the images loaded into the current process
that contain Objective-C or Swift code.

iOS, iPadOS, Mac Catalyst, tvOS, visionOS, watchOS:

```
func objc_copyImageHeaders(_ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<OpaquePointer>
```

Mac Catalyst, macOS:

```
func objc_copyImageHeaders(_ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<UnsafePointer<mach_header>>
```

## Parameters

`outCount`

The number of image headers returned.

## Return Value

An array of @c mach_header pointers. The array contains @c *outCount
pointers followed by a @c NULL terminator. You must free the array with

---

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)