0

I would like to check why there is no internet connection available:

1) Is it because the user has disable cellular data and/or Wi-Fi in settings

or

2) Is it because there is no cellphone coverage in the region

How to do it?

WSBT
  • 33,033
  • 18
  • 128
  • 133

1 Answers1

0

I think you should go with some preliminary searching before posting the question. For checking wether you've internet connectivity or not, you can go with multiple libraries/wrappers available. AFNetworking, Reachibility etc are there. From these wrappers you can get to know whether you have internet connectivity or not.

Now if you don't have internet access then you'll have to find out the reason right?

To check for the actual reason please look at this link.

Community
  • 1
  • 1
if-else-switch
  • 977
  • 1
  • 7
  • 24
  • This does not tell me if the user has disabled the cell data in the settings – iDevelopper Oct 13 '15 at 15:24
  • I would like to propose to the user to go to the settings application if I am sure it is the cellular data option is disabled – iDevelopper Oct 13 '15 at 15:36
  • If user has no internet connection and you can reach to the cellular network then it indicates that user has either disabled the data or he has no data packs. Ideally if you don't have any data packs then also you can connect to the internet. So here is the conclusion for you that the user has disabled data from settings. All the best. Use better if-else clause. – if-else-switch Oct 13 '15 at 18:10
  • Thanks, but it mean that user has turned off cellular data for the app. But i would like to know if the user has turned off cellular data in iPhone settings then for all applications. – iDevelopper Oct 14 '15 at 07:35
  • As far as I know, you can't read `Settings.app` settings. Rest depends upon your research. All the best. – if-else-switch Oct 14 '15 at 08:21
  • Apple has confirmed : – iDevelopper Oct 15 '15 at 08:28
  • Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations. If you would like for Apple to consider adding support for more granular connectivity information in the future, please submit an enhancement request via the Bug Reporter tool at . – iDevelopper Oct 15 '15 at 08:28