---
title: "init(_:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/attributedstring/init(_:)-1fru0"
---

# init(_:)

Creates a value-type attributed string from a reference type.

## Declaration

```swift
init(_ nsStr: NSAttributedString)
```

## Parameters

- `nsStr`: The doc://com.apple.foundation/documentation/Foundation/NSAttributedString to convert.

## Discussion

Discussion This initializer includes all attribute scopes defined by the SDK, such as AttributeScopes.FoundationAttributes, AttributeScopes.SwiftUIAttributes, and AttributeScopes.AccessibilityAttributes. To use third-party attribute scopes, use the initializers init(_:including:) or init(_:including:).

## See Also

### Creating an Attributed String from a Reference Type

- [init(_:including:)](foundation/attributedstring/init(_:including:)-9no47.md)
- [init(_:including:)](foundation/attributedstring/init(_:including:)-puv0.md)
