Hmm, that's quite annoying, as their current sample code does that exact thing: 
https://developer.apple.com/Library/ios/samplecode/Reachability/Listings/Reachability_Reachability_m.html.

Do you know _why_ he suggests not to do that?

In this case, I think that not bringing up the radios is the exact thing I WANT 
to accomplish. I'd suggest that CBL would probably NOT want to activate the 
radios on it's own, but continue to check opportunistically. Making sure that 
the radios up should be in charge of the app developer. I just would like CBL 
to actually try to sync in an environment where Reachability says no, but the 
existence of a proxy would allow it to work anyway.

However, perhaps I'm thinking too generally. Perhaps a simple flag for the 
library that tells it that I will handle checking for reachability or a 
pluggable implementation for CBLReachability would make more sense? I'm sure 
this is a bit of an esoteric case, and the problem I'm solving here will not be 
one for the vast majority of people. Or I can just continue to make a fork, I 
just prefer to share improvements back when possible.

- Ian

On May 16, 2014, at 10:53 PM, Andrew W. Donoho <[email protected]> wrote:

> 
> On May 16, 2014, at 13:00 , Ian Ragsdale <[email protected]> wrote:
> 
>> Sounds like the right thing to do is probably to do a check for reachability 
>> on the zero address (as Apple does in their sample code for 
>> reachabilityForInternetConnection), which should tell us if the radio is 
>> active, and then if the radio is active, we can then make a request to 
>> verify that the server is actually reachable. That way, we won't 
>> unnecessarily tax the battery.
> 
> 
> 
> Ian,
> 
>       I've had a long conversation with Kevin, the author of Apple's 
> Reachability code. (BTW, I have substantially improved it and added a few 
> features, such as touching the of hosts, etc.) I have a blog post to that 
> effect.
> 
>       Kevin would advise you to not listen on 0.0.0.0. You should listen on 
> the address of a real host that you really want to connect with. (The fact 
> that your DNS is frakked is a different question.) Checking for reachability 
> on any address tells you nothing if you haven't tried to bring up the radios. 
> You must attempt to bring them up first and then check reachability. The 
> check alone does nothing of value.
> 
>       
> 
> Anon,
> Andrew
> ____________________________________
> Andrew W. Donoho
> Donoho Design Group, L.L.C.
> [email protected], +1 (512) 666-7596, twitter.com/adonoho
> 
> Download Retweever here: <http://Retweever.com>
> 
> No risk, no art.
>       No art, no reward.
>               -- Seth Godin
> 
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/AD6A674F-140F-4982-9F08-1432AC072E59%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to