---
title: "CFBundleCopyExecutableURL(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbundlecopyexecutableurl(_:)"
---

# CFBundleCopyExecutableURL(_:)

Returns the location of a bundle’s main executable code.

## Declaration

```swift
func CFBundleCopyExecutableURL(_ bundle: CFBundle!) -> CFURL!
```

## Parameters

- `bundle`: The bundle to examine.

## Return Value

Return Value A CFURL object describing the location of bundle’s executable code, or NULL if none is found. Ownership follows the The Create Rule.

## See Also

### Finding Locations in a Bundle

- [CFBundleCopyAuxiliaryExecutableURL(_:_:)](corefoundation/cfbundlecopyauxiliaryexecutableurl(_:_:).md)
- [CFBundleCopyBuiltInPlugInsURL(_:)](corefoundation/cfbundlecopybuiltinpluginsurl(_:).md)
- [CFBundleCopyPrivateFrameworksURL(_:)](corefoundation/cfbundlecopyprivateframeworksurl(_:).md)
- [CFBundleCopyResourcesDirectoryURL(_:)](corefoundation/cfbundlecopyresourcesdirectoryurl(_:).md)
- [CFBundleCopySharedFrameworksURL(_:)](corefoundation/cfbundlecopysharedframeworksurl(_:).md)
- [CFBundleCopySharedSupportURL(_:)](corefoundation/cfbundlecopysharedsupporturl(_:).md)
- [CFBundleCopySupportFilesDirectoryURL(_:)](corefoundation/cfbundlecopysupportfilesdirectoryurl(_:).md)
