---
title: "init(_:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/undomanager/userinfokey/init(_:)"
---

# init(_:)

Creates a user info key from the given string.

## Declaration

```swift
init(_ rawValue: String)
```

## Parameters

- `rawValue`: The raw value string.

## Discussion

Discussion Don’t use this initializer. Instead, extend the UndoManager.UserInfoKey namespace as follows: extension UndoManager.UserInfoKey {     static let icon: UndoManager.UserInfoKey = "icon" }

## See Also

### Creating a user info key from a raw value

- [init(rawValue:)](foundation/undomanager/userinfokey/init(rawvalue:).md)
