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

# CFDataGetBytePtr(_:)

Returns a read-only pointer to the bytes of a CFData object.

```
func CFDataGetBytePtr(_ theData: CFData!) -> UnsafePointer<UInt8>!
```

## Parameters

`theData`

The CFData object to examine.

## Return Value

A read-only pointer to the bytes associated with `theData`.

## Discussion

This function is guaranteed to return a pointer to a CFData object’s internal bytes. CFData, unlike CFString, does not hide its internal storage.

---

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)