---
title: "SCDynamicStoreKeyCreateHostNames(_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scdynamicstorekeycreatehostnames(_:)"
---

# SCDynamicStoreKeyCreateHostNames(_:)

Creates a key that can be used to receive notifications when the HostNames entity changes.

## Declaration

```swift
func SCDynamicStoreKeyCreateHostNames(_ allocator: CFAllocator?) -> CFString
```

## Parameters

- `allocator`: The allocator that should be used to allocate memory for this key. 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.

## Return Value

Return Value A notification string for the HostNames entity.

## Discussion

Discussion Use this key with the SCDynamicStoreSetNotificationKeys(_:_:_:) function. Note that the HostNames entity includes the local host name.

## See Also

### Group

- [SCDynamicStoreKeyCreateNetworkGlobalEntity(_:_:_:)](systemconfiguration/scdynamicstorekeycreatenetworkglobalentity(_:_:_:).md)
- [SCDynamicStoreKeyCreateNetworkInterface(_:_:)](systemconfiguration/scdynamicstorekeycreatenetworkinterface(_:_:).md)
- [SCDynamicStoreKeyCreateNetworkInterfaceEntity(_:_:_:_:)](systemconfiguration/scdynamicstorekeycreatenetworkinterfaceentity(_:_:_:_:).md)
- [SCDynamicStoreKeyCreateNetworkServiceEntity(_:_:_:_:)](systemconfiguration/scdynamicstorekeycreatenetworkserviceentity(_:_:_:_:).md)
- [SCDynamicStoreKeyCreateComputerName(_:)](systemconfiguration/scdynamicstorekeycreatecomputername(_:).md)
- [SCDynamicStoreKeyCreateConsoleUser(_:)](systemconfiguration/scdynamicstorekeycreateconsoleuser(_:).md)
- [SCDynamicStoreKeyCreateLocation(_:)](systemconfiguration/scdynamicstorekeycreatelocation(_:).md)
- [SCDynamicStoreKeyCreateProxies(_:)](systemconfiguration/scdynamicstorekeycreateproxies(_:).md)
