calling SCNetworkReachabilityGetFlags in iOS16 does not return the correct flags as expected

Hi

I just encountered an reachability detection problem by calling SCNetworkReachabilityGetFlags function in iOS 16.

what did I do:

on device iPhone 12, iOS 16.1.1, turn on Airplane Mode, call SCNetworkReachabilityGetFlags, got flags = kSCNetworkReachabilityFlagsTransientConnection | kSCNetworkReachabilityFlagsReachable

on device iPhone 7, iOS 14.5.1, turn on Airplane Mode, call SCNetworkReachabilityGetFlags, got flags = 0

what I expect:

I'm expecting SCNetworkReachabilityGetFlags on my iOS 16.1 device behave same as my iOS 14.5 device, returning flags = 0. It's inappropriate returning kSCNetworkReachabilityFlagsReachable in this case.

Thank you!

calling SCNetworkReachabilityGetFlags in iOS16 does not return the correct flags as expected
 
 
Q