<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 15.4.0 -",
    "macOS: 12.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMediaIO",
  "identifier" : "/documentation/CoreMediaIO/CMIOExtensionDeviceSource/setDeviceProperties(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Media I/O"
    ],
    "preciseIdentifier" : "c:objc(pl)CMIOExtensionDeviceSource(im)setDeviceProperties:error:"
  },
  "title" : "setDeviceProperties(_:)"
}
-->

# setDeviceProperties(_:)

Sets the state of device properties.

```
func setDeviceProperties(_ deviceProperties: CMIOExtensionDeviceProperties) throws
```

## Parameters

`deviceProperties`

A properties object that contains the updated device state.

## Discussion

If you implement this method in Swift and an error occurs, throw
an error and pass more detailed information regarding the property
or properties that failed in the error that you throw. If you implement
this method in Objective-C and an error occurs, pass more
detailed information regarding the property or properties that failed
in the <doc://com.apple.documentation/documentation/Foundation/NSError/localizedDescription>
property of <doc://com.apple.documentation/documentation/Foundation/NSError>.

> Note: The property attributes associated with a property state are
> always `nil` when setting a value.

---

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)