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

# CFDictionaryApplierFunction

Prototype of a callback function that may be applied to every key-value pair in a dictionary.

```
typealias CFDictionaryApplierFunction = (UnsafeRawPointer?, UnsafeRawPointer?, UnsafeMutableRawPointer?) -> Void
```

## Parameters

`key`

The key associated with the current key-value pair.

`value`

The value associated with the current key-value pair.

`context`

The program-defined context parameter given to the apply   function.

## Discussion

This callback is passed to the [`CFDictionaryApplyFunction(_:_:_:)`](/documentation/CoreFoundation/CFDictionaryApplyFunction(_:_:_:)) function which iterates over the key-value pairs in a dictionary and applies the behavior defined in the applier function to each key-value pair in a dictionary.

---

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)