<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSSignpostIntervalState/init(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "s:2os23OSSignpostIntervalStateC4fromACs7Decoder_p_tKcfc"
  },
  "title" : "init(from:)"
}
-->

# init(from:)

Decodes the interval state from the provided decoder.

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

## Parameters

`decoder`

The decoder to read data from.

## Discussion

> Important:
> You don’t call this method directly. Instead, the object you’re using to decode the interval state, which must adopt the <doc://com.apple.documentation/documentation/Swift/Decoder> protocol, calls it on your behalf as part of the serialization process.

The initializer throws an error if reading from the decoder fails, or if the decoder’s data is corrupt or invalid.

---

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)