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

# SCDynamicStoreCreateWithOptions(_:_:_:_:_:)

Creates a new session used to interact with the dynamic store maintained by the System Configuration server.

```
func SCDynamicStoreCreateWithOptions(_ allocator: CFAllocator?, _ name: CFString, _ storeOptions: CFDictionary?, _ callout: SCDynamicStoreCallBack?, _ context: UnsafeMutablePointer<SCDynamicStoreContext>?) -> SCDynamicStore?
```

## Parameters

`allocator`

The allocator that should be used to allocate memory for the local dynamic store object. This parameter may be `NULL` in which case the current default allocator is used. If this value is not a valid <doc://com.apple.documentation/documentation/CoreFoundation/CFAllocator>, the behavior is undefined.

`name`

The name of the calling process or plug-in of the caller.

`storeOptions`

A dictionary of options for the dynamic store session (such as whether all keys added or set into the dynamic store should be per-session keys). Pass `NULL` if no options are desired.

    Currently, the available options are:
    
    |Key                                                                                                    |Value         |
    |-------------------------------------------------------------------------------------------------------|--------------|
    |``doc://com.apple.systemconfiguration/documentation/SystemConfiguration/kSCDynamicStoreUseSessionKeys``|`CFBooleanRef`|

`callout`

The function to be called when a watched value in the dynamic store is changed. Pass `NULL` if no callouts are desired.

`context`

The context associated with the callout. See [`SCDynamicStoreContext`](/documentation/SystemConfiguration/SCDynamicStoreContext) for more information about this value.

## Return Value

A reference to the new dynamic store session. You must release the returned value.

## 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)