---
title: "init(from:configuration:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/decodablewithconfiguration/init(from:configuration:)"
---

# init(from:configuration:)

Creates a new instance by retrieving the instance’s data from the specified decoder with help from the provided configuration.

## Declaration

```swift
init(from decoder: any Decoder, configuration: Self.DecodingConfiguration) throws
```

## Parameters

- `decoder`: The decoder to read data from.
- `configuration`: A decoding configuration instance that provides additional information necessary for decoding.
