Post

Replies

Boosts

Views

Activity

Reply to Unreachabe when using SCNetworkReachabilityCreateWithAddressPair with VPN service
I have the same problem with SCNetworkReachabilityCreateWithAddressPair. I can't make it work at all. I use BSD sockets and try to follow it's reachability status via SCNetworkReachabilityCreateWithAddressPair which is recommended approach for BSD sockets. It never tell the correct status even for just connected socket nor it report any event when actual network disruption works. The only semi working variant is to listen viability of 0.0.0.0 as chromium does: https://source.chromium.org/chromium/chromium/src/+/main:net/base/network_change_notifier_apple.mm. But this seems to work across all network routes, not the actual route used to establish connectivity between two sockets. Still not workaround found.
Jul ’24
Reply to IP Address change detection in an App
I've tried to use SCNetworkReachabilityCreateWithAddressPair to follow the connectivity of just established BSD socket. At least on iOS 17.5.1 it never works. It does report 0 as reachability flags for sockets which is connected and functional. I also unable to make it send me any callback when I actually change network interface and previous network route is not viable.
Jul ’24