On Feb 9, 2016, at 12:15 PM, Jens Alfke wrote:

> 
>> On Feb 9, 2016, at 4:17 AM, Alex Zavatone <z...@mac.com> wrote:
>> 
>> I’ve created multiple tests using reachability and it would be REALLY EASY 
>> if we could simply respond to changes in the Airplane Mode switch.
> 
> This triggers changes in network interfaces that you can detect using the 
> SystemConfiguration framework.
> It _should_ result in a reachability notification, but you’re implying it 
> doesn’t for some reason, right?
> There are lower-level SystemConfiguration APIs that can tell you about 
> network interfaces going up/down.

What is happening is that edge cases are coming back from the client and every 
edge case is another case to fix and test, which requires to much turnaround 
time.

I already removed a race condition where a "start a connection" message was 
sent out when the reachability of the network interfaces had changed to "I am 
not returning 0", but this did not guarantee that the internet connection has 
renegotiated its IP and could reach our target web services yet.

Simply put, if we can detect that this user is has turned off Airplane mode, we 
can respond in a more cautious manner.

The underlying code is wrapping several layers, each with its own "is the 
network available" internal ivar and/or property.

You've pointed me in the right direction, Jens.  If I have the time to fix it, 
that's another matter.

I do have an, "I don't care what changed, can this device reach this IP through 
any means?" method set up.  It's just the underlying layers of PTSD inducing 
fragile spaghetti code that simply aren't safe to try and change that lie 
underneath… waiting to bite the poor soul who thinks they can modify them.  

I'll take a look at the system configuration frameworks.  

Cheers and thanks again.

> 
> —Jens

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to