---
title: "init(rawValue:)"
framework: Device Activity
role: symbol
role_heading: Initializer
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+]
path: "deviceactivity/deviceactivityevent/name/init(rawvalue:)"
---

# init(rawValue:)

Creates a new instance with the specified raw value.

## Declaration

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

## Parameters

- `rawValue`: The raw value to use for the new instance.

## Discussion

Discussion The following code example prints the specified raw value. extension DeviceActivityEvent.Name {     static let event = Self("Event") }

print(DeviceActivityEvent.Name.event.rawValue) // Prints "Event".

## See Also

### Creating an Instance

- [init(_:)](deviceactivity/deviceactivityevent/name/init(_:).md)
