2

It appears that CWInterface is deprecated in 10.10 Yosemite, and it has been replaced with CWWiFiClient.

In CWInterface I would normally use the setPower method to disable WiFi, but I do not know of a similar method in CWWiFiClient.

Does anyone know how to disable WiFi with CWWiFiClient?

Thanks.

Jake Chasan
  • 6,290
  • 9
  • 44
  • 90

2 Answers2

2

Get CWInterface instance like this:

let _en: CWInterface! = CWWiFiClient.sharedWiFiClient().interface()

and now you can use the setPower method to disable WiFi again!

timest
  • 188
  • 2
  • 9
-2

According to Apple CWInterface and setPower is still current in 10.10, but has just been modified.

https://developer.apple.com/library/mac/documentation/General/Reference/APIDiffsMacOSX10_10SeedDiff/frameworks/CoreWLAN.html

sean
  • 1