---
title: "CFBundleLoadExecutable(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbundleloadexecutable(_:)"
---

# CFBundleLoadExecutable(_:)

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

## Declaration

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

## Parameters

- `bundle`: The bundle whose main executable you want to load.

## Return Value

Return Value true if the executable was successfully loaded, otherwise false.

## Discussion

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

## See Also

### Loading and Unloading a Bundle

- [CFBundleIsExecutableLoaded(_:)](corefoundation/cfbundleisexecutableloaded(_:).md)
- [CFBundlePreflightExecutable(_:_:)](corefoundation/cfbundlepreflightexecutable(_:_:).md)
- [CFBundleLoadExecutableAndReturnError(_:_:)](corefoundation/cfbundleloadexecutableandreturnerror(_:_:).md)
- [CFBundleUnloadExecutable(_:)](corefoundation/cfbundleunloadexecutable(_:).md)
