---
title: "interface(withName:)"
framework: corewlan
role: symbol
role_heading: Instance Method
path: "corewlan/cwwificlient/interface(withname:)"
---

# interface(withName:)

Returns the Wi-Fi interface with the given name.

## Declaration

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

## Parameters

- `interfaceName`: The name of an available Wi-Fi interface. Use the doc://com.apple.corewlan/documentation/CoreWLAN/CWWiFiClient/interfaceNames()-swift.type.method class method to obtain a list of valid interface names.

## Return Value

Return Value The CWInterface object bound to the given interface name, or the default interface if no name is specified.

## See Also

### Getting Interfaces

- [interface()](corewlan/cwwificlient/interface().md)
- [interfaces()](corewlan/cwwificlient/interfaces().md)
- [interfaceNames()](corewlan/cwwificlient/interfacenames()-swift.type.method.md)
