<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFBundleLoadExecutable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFBundleLoadExecutable"
  },
  "title" : "CFBundleLoadExecutable(_:)"
}
-->

# CFBundleLoadExecutable(_:)

Loads a bundle’s main executable code into memory and dynamically links it into the running application.

```
func CFBundleLoadExecutable(_ bundle: CFBundle!) -> Bool
```

## Parameters

`bundle`

The bundle whose main executable you want to load.

## Return Value

`true` if the executable was successfully loaded, otherwise `false`.

## Discussion

You should typically try to avoid using this function, but instead use [`CFBundleGetFunctionPointerForName(_:_:)`](/documentation/CoreFoundation/CFBundleGetFunctionPointerForName(_:_:)) and related functions since these make memory management of the bundle easier.

---

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)