<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBHostInterface/selectAlternateSetting(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:objc(cs)IOUSBHostInterface(im)selectAlternateSetting:error:"
  },
  "title" : "selectAlternateSetting(_:)"
}
-->

# selectAlternateSetting(_:)

Selects an alternative setting for the interface.

```
func selectAlternateSetting(_ alternateSetting: Int) throws
```

## Parameters

`alternateSetting`

The alternative interface number to activate.

## Discussion

Use this method to select an alternative setting for the interface. The operation aborts all pending input/output requests on the interface’s pipes, and closes all open pipes. It also selects the new alternative setting through the `SET_INTERFACE` control request (See USB 3.2, 9.4.10.).

> Note:
> Any ``doc://com.apple.iousbhost/documentation/IOUSBHost/IOUSBHostPipe`` objects that already exist are no longer valid.

---

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)