I tested it on a physical iPhone 6, it doesn't work. I turned the cellular data off and it worked, you got any idea about this? it's working when the 4g is off.
– suisiedOct 9 '15 at 10:22

I have updated the answer. You will get the message "Not able to connect to internet" when 4g/3g/2g/wifi is 'OFF' and if all of the above is 'ON' then you will get prompt "Connected to internet".
– KarlosOct 9 '15 at 10:36

I think u just added conditionals with alertview and not alter the function. It only works with wireless connection, not detect whenver the 4g is out of service.
– suisiedOct 9 '15 at 11:28

Hi, welcome to stackoverflow. Please describe the answers more. Clear answer will help people understand what you mean and will increase the chance of selecting as an answer
– Ashkan SirousSep 24 '16 at 12:18