在网络可用时收到通知

时间:2022-10-02 16:58:34

I am wondering, is there a way to be notified of the availability of a desired network while being connected to a different one?

我想知道,有没有办法在连接到另一个网络时通知所需网络的可用性?

Trying to explain myself. I am connected with my Mac to network A. Is there a way to be notified that network B has become available?

试图解释自己。我与我的Mac连接到网络A.有没有办法通知网络B已经可用?

Being able to afterward connect to network B would be awesome too.

之后能够连接到网络B也很棒。

EDIT.

编辑。

I think what I am looking for is an equivalent of the broadcastReceiver in Android, but I can not find anything related to Objective-C.

我认为我所寻找的是与Android中的broadcastReceiver等效,但我找不到与Objective-C相关的任何内容。

1 个解决方案

#1


1  

As mentioned in this answer, Apple has a sample project for a Wifi scanner. Inspect the code and you will find the answer you are looking for.

正如在这个答案中提到的,Apple有一个Wifi扫描仪的示例项目。检查代码,您将找到您正在寻找的答案。

#1


1  

As mentioned in this answer, Apple has a sample project for a Wifi scanner. Inspect the code and you will find the answer you are looking for.

正如在这个答案中提到的,Apple有一个Wifi扫描仪的示例项目。检查代码,您将找到您正在寻找的答案。