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

# kCFCopyStringDictionaryKeyCallBacks

Predefined [`CFDictionaryKeyCallBacks`](/documentation/CoreFoundation/CFDictionaryKeyCallBacks) structure containing a set of callbacks appropriate for use when the keys of a CFDictionary are all CFString objects, which may be mutable and need to be copied in order to serve as constant keys for the values in the dictionary.

```
let kCFCopyStringDictionaryKeyCallBacks: CFDictionaryKeyCallBacks
```

## Discussion

You typically use a pointer to this constant when creating a new dictionary.

> Important:
> For performance reasons, the default `kCFCopyStringDictionaryKeyCallBacks` behavior uses ``doc://com.apple.corefoundation/documentation/CoreFoundation/CFEqual(_:_:)`` which does not normalize the strings. This means that, for example, it does not consider CFStrings to be equal when they are the same but one is in pre-composed form (say, originating from a UTF-16 text file) and the other in decomposed form (say, originating from a file name). In cases where you use strings from different sources, you may want to pre-normalize the keys or else use a different set of functions to perform the comparison.

---

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)