Reachability behaviour changed with Sonoma 14.2b

Hi,

I'm looking for feedback regarding SCNetworkReachability under macOS Sonoma. It seems that since beta 3 the notifications behaviour changed.

In a LaunchAgent I'm using SCNetworkReachabilityCreateWithName + SCNetworkReachabilitySetCallback + SCNetworkReachabilityScheduleWithRunLoop and wait for callbacks looking at the kSCNetworkReachabilityFlagsReachable flag. This is running fine under macOS 12.x, 13.x and 14.0 for more than a year.

If I log all callback entries I observe unexpected notifications as if the looked host became unreachable for very small amount of time (ms). The host is flagged as unreachable then few ms later reachable again then unreachable again.

Fast switching is fine, I can accept that the service is unreachable even for 1s but the probleme is the latest status do not reflect actual reachability of the service.

This is in a corporate network with the complexity of using a proxy.pac.

Does anybody noticed something similar ?

I filled a Feedback FB13442134 in case it could be a regression of 14.2

Two bits of general advice:

  • Switch to NWPathMonitor. It’s a lot easier to use.

  • Regardless, I recommend that you debounce signals like this. They’ve always been susceptible to transients. I’m kinda surprise you haven’t been bitten by this previously.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Reachability behaviour changed with Sonoma 14.2b
 
 
Q