---
title: "init(from:)"
framework: Assignables
role: symbol
role_heading: Initializer
platforms: [iOS 17.4+, iPadOS 17.4+, Mac Catalyst 17.4+]
path: "assignables/anyuseridentity/init(from:)"
---

# init(from:)

Creates a new instance by decoding from the given decoder.

## Declaration

```swift
init(from decoder: any Decoder) throws
```

## Parameters

- `decoder`: The decoder to read data from.

## Discussion

Discussion This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

## See Also

### Creating a user identity

- [init(_:)](assignables/anyuseridentity/init(_:).md)
