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

# init(name:)

An instance method for obtaining an CWInterface object.

## Declaration

```swift
convenience init(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. This method is the designated initializer for the CWInterface class.

## See Also

### Getting an interface

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