<!--
{
  "availability" : [
    "macOS: 10.6.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreWLAN",
  "identifier" : "/documentation/CoreWLAN/CWInterface/init(name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core WLAN"
    ],
    "preciseIdentifier" : "c:objc(cs)CWInterface(cm)interfaceWithName:"
  },
  "title" : "init(name:)"
}
-->

# init(name:)

An instance method for obtaining an CWInterface object.

```
convenience init(name: String?)
```

## Parameters

`name`

An NSString representing the BSD name of a WLAN interface.

## Return Value

An CWInterface object configured to control the named CoreWLAN interface.

## 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.

---

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)