使用 CWWiFiClient 禁用 WiFi
Disable WiFi with CWWiFiClient
看来 CWInterface
在 10.10 Yosemite 中已被弃用,它已被替换为 CWWiFiClient
。
在CWInterface
中,我通常会使用setPower
方法来禁用WiFi,但我不知道在CWWiFiClient
中有类似的方法。
有谁知道如何使用 CWWiFiClient
禁用 WiFi?
谢谢。
根据 Apple CWInterface 和 setPower 在 10.10 中仍然是最新的,但刚刚被修改。
像这样获取 CWInterface 实例:
let _en: CWInterface! = CWWiFiClient.sharedWiFiClient().interface()
现在您可以使用setPower
方法再次禁用WiFi!
看来 CWInterface
在 10.10 Yosemite 中已被弃用,它已被替换为 CWWiFiClient
。
在CWInterface
中,我通常会使用setPower
方法来禁用WiFi,但我不知道在CWWiFiClient
中有类似的方法。
有谁知道如何使用 CWWiFiClient
禁用 WiFi?
谢谢。
根据 Apple CWInterface 和 setPower 在 10.10 中仍然是最新的,但刚刚被修改。
像这样获取 CWInterface 实例:
let _en: CWInterface! = CWWiFiClient.sharedWiFiClient().interface()
现在您可以使用setPower
方法再次禁用WiFi!