---
title: "SCDynamicStoreAddTemporaryValue(_:_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scdynamicstoreaddtemporaryvalue(_:_:_:)"
---

# SCDynamicStoreAddTemporaryValue(_:_:_:)

Temporarily adds the specified key-value pair to the dynamic store, if no such key already exists.

## Declaration

```swift
func SCDynamicStoreAddTemporaryValue(_ store: SCDynamicStore, _ key: CFString, _ value: CFPropertyList) -> Bool
```

## Parameters

- `store`: The dynamic store session.
- `key`: The key of the value to add to the dynamic store.
- `value`: The value to add to the dynamic store.

## Return Value

Return Value TRUE if the key was added; FALSE if the key was already present in the dynamic store or if an error occurred.

## Discussion

Discussion Unless the key is updated by another session, the key-value pair added by this function is removed automatically when the session is closed.

## See Also

### Adding or Updating Keys and Values

- [SCDynamicStoreAddValue(_:_:_:)](systemconfiguration/scdynamicstoreaddvalue(_:_:_:).md)
- [SCDynamicStoreSetMultiple(_:_:_:_:)](systemconfiguration/scdynamicstoresetmultiple(_:_:_:_:).md)
- [SCDynamicStoreSetValue(_:_:_:)](systemconfiguration/scdynamicstoresetvalue(_:_:_:).md)
