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

# CFBundleCopyExecutableArchitecturesForURL(_:)

Returns an array of CFNumbers representing the architectures a given URL provides.

```
func CFBundleCopyExecutableArchitecturesForURL(_ url: CFURL!) -> CFArray!
```

## Parameters

`url`

The URL to examine.

## Return Value

For a directory URL, if the bundle’s executable exists and is a Mach-O file, returns an array of CFNumbers whose values are integers representing the architectures the URL provides. For a plain file URL representing an unbundled executable, returns the architectures it provides if it is a Mach-O file. Possible values are listed in [Architecture Types](/documentation/CoreFoundation/1537096-architecture-types). If there is no bundle executable or if the executable is not a Mach-O file, returns `NULL`. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

For a directory URL, this is equivalent to calling [`CFBundleCopyExecutableArchitectures(_:)`](/documentation/CoreFoundation/CFBundleCopyExecutableArchitectures(_:)) on the corresponding bundle.

---

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)