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

# CFGetTypeID(_:)

Returns the unique identifier of an opaque type to which a Core Foundation object belongs.

```
func CFGetTypeID(_ cf: CFTypeRef!) -> CFTypeID
```

## Parameters

`cf`

The CFType object to examine.

## Return Value

A value of type [`CFTypeID`](/documentation/CoreFoundation/CFTypeID) that identifies the opaque type of `cf`.

## Discussion

This function returns a value that uniquely identifies the opaque type of any Core Foundation object. You can compare this value with the known [`CFTypeID`](/documentation/CoreFoundation/CFTypeID) identifier obtained with a “GetTypeID” function specific to a type, for example [`CFDateGetTypeID()`](/documentation/CoreFoundation/CFDateGetTypeID()). These values might change from release to release or platform to platform.

---

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)