---
title: "init(interfaceName:)"
framework: corewlan
role: symbol
role_heading: Initializer
path: "corewlan/cwinterface/init(interfacename:)"
---

# init(interfaceName:)

Convenience method for getting an CWInterface object with the specified name.

## Declaration

```swift
init(interfaceName name: String?)
```

## Parameters

- `name`: An NSString representing the BSD name of a WLAN interface.

## Return Value

Return Value An CWInterface object configured to control the named CoreWLAN interface.

## Discussion

Discussion The interface name must be in the BSD name form (e.g. “en1”), and can be passed in explicitly or derived from the call to +(NSString *)supportedInterfaces. If name is nil, the method returns an CWInterface object for the primary interface.

## See Also

### Getting an interface

- [init(name:)](corewlan/cwinterface/init(name:).md)
