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

# CFBagApplierFunction

Prototype of a callback function that may be applied to every value in a bag.

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

## Parameters

`value`

The current value in a bag.

`context`

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

## Discussion

This callback is passed to the [`CFBagApplyFunction(_:_:_:)`](/documentation/CoreFoundation/CFBagApplyFunction(_:_:_:)) function which iterates over the values in a bag and applies the behavior defined in the applier function to each value in a bag.

---

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)