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

# CFMachPortGetPort(_:)

Returns the native Mach port represented by a CFMachPort object.

```
func CFMachPortGetPort(_ port: CFMachPort!) -> mach_port_t
```

## Parameters

`port`

The CFMachPort object to examine.

## Return Value

The native Mach port represented by `port`.

## Discussion

---

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)