---
title: CWInterface
framework: corewlan
role: symbol
role_heading: Class
path: corewlan/cwinterface
---

# CWInterface

Encapsulates an IEEE 802.11 interface.

## Declaration

```swift
class CWInterface
```

## Overview

Overview Provides access to various WLAN interface parameters, and operations such as scanning for networks, association, and creating computer-to-computer (ad-hoc) networks. important: Do not instantiate interface objects directly. Instead, use interface objects vended by a CWWiFiClient instance via the interface() method or one of its relatives. This enables your app to adopt App Sandbox even when it uses CoreWLAN without the need for any special exceptions. Directly instantiating interface objects causes low level access to system sockets, which by default is not allowed in a sandboxed environment.

## Topics

### Setting interface parameters

- [setPairwiseMasterKey(_:)](corewlan/cwinterface/setpairwisemasterkey(_:).md)
- [setPower(_:)](corewlan/cwinterface/setpower(_:).md)
- [setWEPKey(_:flags:index:)](corewlan/cwinterface/setwepkey(_:flags:index:).md)
- [setWLANChannel(_:)](corewlan/cwinterface/setwlanchannel(_:).md)

### Scanning for networks

- [scanForNetworks(withName:)](corewlan/cwinterface/scanfornetworks(withname:).md)
- [scanForNetworks(withSSID:)](corewlan/cwinterface/scanfornetworks(withssid:).md)

### Getting an interface

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

### Getting all attached interfaces

- [interfaceNames()](corewlan/cwinterface/interfacenames().md)

### Disassociating from a network

- [disassociate()](corewlan/cwinterface/disassociate().md)

### Creating computer-to-computer networks

- [startIBSSMode(withSSID:security:channel:password:)](corewlan/cwinterface/startibssmode(withssid:security:channel:password:).md)

### Committing a configuration

- [commitConfiguration(_:authorization:)](corewlan/cwinterface/commitconfiguration(_:authorization:).md)

### Associating to a network

- [associate(toEnterpriseNetwork:identity:username:password:)](corewlan/cwinterface/associate(toenterprisenetwork:identity:username:password:).md)
- [associate(to:password:)](corewlan/cwinterface/associate(to:password:).md)

### Instance Properties

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

### Instance Methods

- [activePHYMode()](corewlan/cwinterface/activephymode().md)
- [bssid()](corewlan/cwinterface/bssid().md)
- [cachedScanResults()](corewlan/cwinterface/cachedscanresults().md)
- [configuration()](corewlan/cwinterface/configuration().md)
- [countryCode()](corewlan/cwinterface/countrycode().md)
- [hardwareAddress()](corewlan/cwinterface/hardwareaddress().md)
- [interfaceMode()](corewlan/cwinterface/interfacemode().md)
- [noiseMeasurement()](corewlan/cwinterface/noisemeasurement().md)
- [powerOn()](corewlan/cwinterface/poweron().md)
- [rssiValue()](corewlan/cwinterface/rssivalue().md)
- [scanForNetworks(withName:includeHidden:)](corewlan/cwinterface/scanfornetworks(withname:includehidden:).md)
- [scanForNetworks(withSSID:includeHidden:)](corewlan/cwinterface/scanfornetworks(withssid:includehidden:).md)
- [security()](corewlan/cwinterface/security().md)
- [serviceActive()](corewlan/cwinterface/serviceactive().md)
- [ssid()](corewlan/cwinterface/ssid().md)
- [ssidData()](corewlan/cwinterface/ssiddata().md)
- [supportedWLANChannels()](corewlan/cwinterface/supportedwlanchannels().md)
- [transmitPower()](corewlan/cwinterface/transmitpower().md)
- [transmitRate()](corewlan/cwinterface/transmitrate().md)
- [wlanChannel()](corewlan/cwinterface/wlanchannel().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Classes

- [CWChannel](corewlan/cwchannel.md)
- [CWConfiguration](corewlan/cwconfiguration.md)
- [CWMutableConfiguration](corewlan/cwmutableconfiguration.md)
- [CWMutableNetworkProfile](corewlan/cwmutablenetworkprofile.md)
- [CWNetwork](corewlan/cwnetwork.md)
- [CWNetworkProfile](corewlan/cwnetworkprofile.md)
- [CWWiFiClient](corewlan/cwwificlient.md)
