---
title: "init(coder:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpsfunction/init(coder:)"
---

# init(coder:)

## Declaration

```swift
init?(coder aDecoder: NSCoder)
```

## Discussion

Discussion Called by NSCoder to decode MPSKernels This standard method doesn’t allow for control over which device the object targets. By default this will be the Metal system default device. If you want another device, use the MPSKeyedUnarchiver or other  to decode the function.
