Re: Reachability flag is inverse of actual state in Simulator
Re: Reachability flag is inverse of actual state in Simulator
- Subject: Re: Reachability flag is inverse of actual state in Simulator
- From: Jens Alfke <email@hidden>
- Date: Mon, 04 Nov 2013 16:15:13 -0800
I’m using SCNetworkReachability. I get called back on network state changes (I’m unplugging and plugging the ethernet cable on the Thunderbolt dongle on my Retina MacBook Pro). But the “reachable” bit is the inverse of the actual reachability. That is, it’s 0 when the cable is plugged in, and 1 when it’s unplugged. The first launch is always true, regardless of the state of the physical connection. Changes to the physical connection after that result in the callback with inverse reachability flags.
Weird. It sounds like maybe your call is one step behind, i.e. after the cord is unplugged you’re getting the state for before it got unplugged?
FWIW, I haven’t seen such issues. Here’s my own reachability wrapper code. Maybe there’s something different about what you’re doing?
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden