-1

Using Mac os x 10.13 the network preferences pane shows status of network services (eg Wi-Fi and/or Ethernet) being connected or not. If I change the service status, say by turning Wi-Fi off or on, or disconnecting/connecting ethernet cable then the Preferences Pane reflects this change immediately which implies that it is getting some notification of the network service changes.

How can I accomplish receiving these types of notifications in my Swift program?

I know that I can create a timer object to periodically check the status using the NetworkSetup app process commands and this works fine, but I wish to be notified when the changes occur.

user2132980
  • 195
  • 2
  • 10

1 Answers1

-1

never mind; it looks like this is do-able using the SystemConfiguration framework

user2132980
  • 195
  • 2
  • 10
  • This is not an answer, and should not be posted as one. If you've found a solution you'd like to share, do so by writing a proper answer that meets the quality standards here. If you don't care to do so, then either wait until someone else does or delete your question itself. – Ken White Jul 07 '18 at 01:48