---
title: "SCDynamicStoreSetNotificationKeys(_:_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scdynamicstoresetnotificationkeys(_:_:_:)"
---

# SCDynamicStoreSetNotificationKeys(_:_:_:)

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

## Declaration

```swift
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

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

## See Also

### Monitoring Keys and Values

- [SCDynamicStoreNotifyValue(_:_:)](systemconfiguration/scdynamicstorenotifyvalue(_:_:).md)
- [SCDynamicStoreSetDispatchQueue(_:_:)](systemconfiguration/scdynamicstoresetdispatchqueue(_:_:).md)
