<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreWLAN",
  "identifier" : "/documentation/CoreWLAN/CWWiFiClient/interface(withName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core WLAN"
    ],
    "preciseIdentifier" : "c:objc(cs)CWWiFiClient(im)interfaceWithName:"
  },
  "title" : "interface(withName:)"
}
-->

# interface(withName:)

Returns the Wi-Fi interface with the given name.

```
func interface(withName interfaceName: String?) -> CWInterface?
```

## Parameters

`interfaceName`

The name of an available Wi-Fi interface. Use the [`interfaceNames()`](/documentation/CoreWLAN/CWWiFiClient/interfaceNames()-swift.type.method) class method to obtain a list of valid interface names.

## Return Value

The [`CWInterface`](/documentation/CoreWLAN/CWInterface) object bound to the given interface name, or the default interface if no name is specified.

## Discussion

---

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)