iOS: Internet connection available?

Chris Sheffield cmsheffield at me.com
Thu Oct 11 10:31:35 EDT 2012


Unfortunately I realized this solution won't work. The device could be connected to a wireless network but not necessarily have Internet access.

So back to the drawing board...


On Oct 10, 2012, at 3:59 PM, Chris Sheffield <cmsheffield at me.com> wrote:

> I did just read through that.
> 
> Unfortunately, it doesn't seem to be working properly. Or maybe I'm not using it in the right way. When I tried testing it just now, I always got an empty value back in the reachability info, even when I had WiFi turned on. It looks like it's designated as "experimental", so maybe it's just not polished up yet.
> 
> I did find another working solution, but whether or not it's reliable remains to be seen. There's a networkInterfaces property. This appears to return simply "127.0.0.1" when no Internet connection is available. If there is a connection available, it returns a list of all IP addresses, one for each available network interface. I'll be testing this out some more, but so far it looks promising.
> 
> Thanks for the suggestion about network reachability. That would probably be the better way to go if it were working...
> 
> Chris
> 
> 
> On Oct 10, 2012, at 3:51 PM, Guglielmo Braguglia <guglielmo at braguglia.ch> wrote:
> 
>> Hi Chris,
>> read the "iOS Release Notes", paragraph : "Network reachability checking" ... :)
>> 
>> Guglielmo
>> 
>> 
>> On 10.10.2012 23:39, Chris Sheffield wrote:
>>> Does anyone have a good way in an iOS app to determine if an Internet connection is available? I'm not finding anything very useful in the LC Dictionary. Bonus points if there's also a way to determine the type of connection available (WiFi vs. cell service (3G/4G)).
>>> 
>>> Thanks,
>>> Chris
>>> 
>>> 
>>> --
>>> Chris Sheffield
>>> Read Naturally, Inc.
>>> www.readnaturally.com
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list