Questions tagged [reachability]

Reachability is an iOS sample application which demonstrates how to use the SystemConfiguration framework to monitor the network state of an iPhone or iPod touch. In particular, it demonstrates how to know when IP can be routed and when traffic will be routed through a Wireless Wide Area Network (WWAN) interface such as EDGE or 3G.

Reachability is an iOS sample application which demonstrates how to use the SystemConfiguration framework to monitor the network state of an iPhone or iPod touch. In particular, it demonstrates how to know when IP can be routed and when traffic will be routed through a Wireless Wide Area Network (WWAN) interface such as EDGE or 3G.

856 questions
4
votes
3 answers

Reachability returns False for Cellular network when both Wi-Fi and Cellular is ON

I am using Apple's Reachability code, to determine whether Internet connectivity is there or not. Now I found that when I keep Both Cellular and WIFI ON then my check for Cellular shows FALSE and my WIFI check shows TRUE. I have tried modifying…
DShah
  • 9,768
  • 11
  • 71
  • 127
4
votes
1 answer

iOS Reachability - issues with slow and missing notifications

I'm using the Apple provided sample code to monitor Reachability - but it's still causing me a headache. I'm running on iOS 5, btw. // Initialise hostReach = [[Reachability reachabilityForInternetConnection] retain]; [hostReach…
Snips
  • 6,575
  • 7
  • 40
  • 64
4
votes
2 answers

Reachability - strange issue

Reachability *r = [Reachability reachabilityWithHostName:@"www.google.com"]; This line works fine on device, but on simulator i get crash : * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[Reachability…
user784625
  • 1,928
  • 5
  • 24
  • 38
4
votes
1 answer

Reachability code blocking main thread

I'm currently working on an app that requires me to check for reachability. Owing to that, I started looking stuff up and found DDG and Apple's code. I decided to go with Apple's latest reachability code. I imported that, and as suggested in Apple's…
codeBearer
  • 5,114
  • 4
  • 25
  • 29
4
votes
1 answer

Does SCNetworkReachability respect HTTP proxy settings?

I'm afraid the answer to this is No, but I'm hoping someone can provide a definitive answer as it is not documented in the current iOS SDK documentation. We're seeing a case where NSURLConnection is able to connect to https://mysite.com via an HTTP…
thrusty
  • 864
  • 1
  • 8
  • 18
4
votes
2 answers

reachabilityWithHostName timeout

I'm implementing the Reachability class to check connection status as follows: Reachabilitty *reachability = [Reachability reachabilityWithHostName:@"apple.com"]; Network status = [reachability currentReachabilityStatus]; if(status ==…
karse23
  • 4,055
  • 6
  • 29
  • 33
4
votes
2 answers

Detect Network Changes in Background (iOS)

I am trying to create a VPN app that notifies the user when the VPN is turned off manually in the Settings app. More generally, I want to be able to react when the network settings are changed. I have seen a lot of comments on StackOverflow…
aequinox
  • 125
  • 1
  • 17
4
votes
2 answers

How to check network status in iphone app?

I have setup some methods to check network status in my app. In my viewDidLoad method I call initNetworkCheck: [self initNetworkCheck]; [super viewDidLoad]; if(internetActive == NO){ compose.enabled = NO; } So I want to check on startup if…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
4
votes
2 answers

Reachability - for local LAN IP address

I am trying to check the reachability of a device on WIFI I have modified code from Maher Ali's book "Advanced IOS4 Programming" to use an IP address as follows - (BOOL) networkConnected: (NSString *) addr { SCNetworkReachabilityFlags flags =…
Dave Appleton
  • 465
  • 1
  • 6
  • 18
4
votes
2 answers

How to detect if an iOS user is connected to cellular network versus wi-fi?

I need to differentiate between the iPhone/iPad user being connected to cellular versus wifi. Under the SCNetworkReachabilityFlag .isWWAN, Apple says: The absence of this flag does not necessarily mean that a connection will never pass over a…
Mendo
  • 163
  • 1
  • 5
4
votes
1 answer

Sometimes WatchConnectivity session on paired watch simulator is not reachable

I have an iOS app that communicates with the paired watch using WatchConnectivity. In most cases, it works without problems, on the simulators and on the devices. The problem: During development on the simulators, I get now and then the following…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
4
votes
2 answers

iOS: How to test Internet connection in the most easy way, without freezing the app (without Reachability)?

In my code I used to use three ways for checking Internet, but there is limits to them: 1/ Reachability method: - (BOOL)isInternetOk { Reachability *curReach = [Reachability reachabilityWithHostName:@"apple.com"]; NetworkStatus netStatus =…
4
votes
4 answers

Crash in Reachability API

I'm using the Reachability sample code provided by Apple to check the network connectivity and get notified of changes (Reachability Sample code). I had a look at some crash locks of my app. It seems that some crashes are due to the…
Marc
  • 233
  • 4
  • 6
4
votes
1 answer

iOS - Concurrency performing 5 operations uploading images to server using NSOperationQueue followed by single Task in Objective-c

I have to perform below operations using nsoperationqueue concurrently. I need to perform multiple operations in background at a time like 5(Uploading files to Server) , i have to manage all queues depends up on follow scenorio 1) network is 2G…
4
votes
1 answer

IOS/Objective-C: Fastest way to check for Internet connection - 2017

My code for checking for an Internet connection, I discovered yesterday on an airplane, is excruciatingly slow. I am using the technique in many older SO answers of checking an NSUURL, however, it literally took fifteen seconds or more to return…
zztop
  • 701
  • 1
  • 7
  • 20