<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/CodableConfiguration/init(wrappedValue:from:)-8mkxk",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation20CodableConfigurationVA2A14AttributeScopeR_rlE12wrappedValue4fromACyxq_Gx_s7KeyPathCyAA0D6ScopesOq_mGtcfc"
  },
  "title" : "init(wrappedValue:from:)"
}
-->

# init(wrappedValue:from:)

Creates a codable configuration wrapper for the given value, using given configuration provider type identified by key path.

```
init(wrappedValue: T, from keyPath: KeyPath<AttributeScopes, ConfigurationProvider.Type>)
```

## Parameters

`wrappedValue`

The underlying value to make codable, using data from the configuration provider.

`keyPath`

A key path that identifies the type of the configuration provider, which provides additional information to encode `wrappedValue`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)