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

# setPropertyState(_:forProperty:)

Sets the value of a device property.

```
func setPropertyState(_ propertyState: CMIOExtensionPropertyState<AnyObject>?, forProperty property: CMIOExtensionProperty)
```

## Parameters

`propertyState`

The updated property state.

`property`

The property to update.

## Discussion

Setting a `nil` property state value doesn’t remove the property.

---

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)