<!--
{
  "availability" : [
    "macOS: 10.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/SCDynamicStoreSetNotificationKeys(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@SCDynamicStoreSetNotificationKeys"
  },
  "title" : "SCDynamicStoreSetNotificationKeys(_:_:_:)"
}
-->

# SCDynamicStoreSetNotificationKeys(_:_:_:)

Specifies a set of keys and key patterns that should be monitored for changes.

```
func SCDynamicStoreSetNotificationKeys(_ store: SCDynamicStore, _ keys: CFArray?, _ patterns: CFArray?) -> Bool
```

## Parameters

`store`

The dynamic store session being watched.

`keys`

An array of keys to be monitored or `NULL` if no specific keys are to be monitored.

`patterns`

An array of regex(3) pattern strings used to match keys to be monitored or `NULL` if no key patterns are to be monitored.

## Return Value

`TRUE` if the set of notification keys and patterns was successfully updated; otherwise, `FALSE`.

## Discussion

---

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)