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
8
votes
3 answers

How to detect change in network with Reachability?

I'm currently checking network connection on viewDidLoad using this: -(BOOL)reachable { ReachabilityDRC *r = [ReachabilityDRC reachabilityWithHostName:@"google.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; …
Jon
  • 4,732
  • 6
  • 44
  • 67
8
votes
3 answers

Swift 3: Checking Internet (Reocurring) viewDidAppear not

Ok, So I am rather new to Swift and I am a little confused about what I am trying to do, or if I am going in the wrong direction. (https://github.com/ashleymills/Reachability.swift) Here is my viewDidLoad method : override func viewDidLoad() { …
JamesG
  • 1,552
  • 8
  • 39
  • 86
8
votes
1 answer

Reachability vs NSURLSession response to detect internet connection

I'm building out error cases for my API calls and would like to check for a condition when an internet connection in not available. dataTaskWithRequest seems to handle this just fine and returns an NSError with code -1009 with a description of no…
yamski
  • 471
  • 4
  • 14
8
votes
3 answers

Unity check internet connection availability

I am porting our game to Unity, and need some help regarding internet connectivity check in Unity. Official Unity Documentation says 'do not use Application.internetReachability. So i am confused which code will work here. Didn't find any prominent…
stack
  • 951
  • 3
  • 9
  • 23
8
votes
3 answers

How to detect loss of internet reachability when wifi source loses connection?

I am trying hard to get the authentic internet connectivity status. I have used Apple's Reachability but it's only giving me the status of wifi connectivity i.e. not covering the case when the device is connected via wifi (to a router or hotspot),…
Ahmed
  • 772
  • 1
  • 9
  • 26
8
votes
4 answers

guaranteed delivery for uploads after network reconnect, even if my app is not running

I'm spec-ing an iOS app (which will be built outside of our company) which will upload a user's data entry to a server. If the device is not connected to the Internet, we'd like to save data on the device and upload it when the network is…
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
7
votes
2 answers

can not detect internet connection with Reachability reachabilityForInternetConnection

I have a problem. I am using reachabilityForInternetConnection method of Reachability for detecting internet availability but instead of that I am getting status of connection and not status of internet. I mean if I turn of my Wifi connection, the…
Aqueel
  • 1,246
  • 3
  • 23
  • 46
7
votes
2 answers

Detect wifi enabled (regardless of whether it's connected)

For a GPS tracking app, recording location signals with WIFI turned on results in really imprecise data or data with gaps. I've used the Reachability queries to detect if wifi is available prior to starting tracking. The problem is that if when…
earnshavian
  • 1,864
  • 2
  • 13
  • 17
7
votes
1 answer

Reachability Help - WiFi Detection

I have imported Reachability into my application, and I have a couple of how-to questions for you all. Let me explain my application and other tools first. This application communicates with two things AT THE SAME TIME, an ad-hoc network, and the…
Baub
  • 5,004
  • 14
  • 56
  • 99
7
votes
2 answers

Reachability causes crash after no network situation -- how to properly use Reachability asynchronously

I was encountering a very strange crash with my iPhone app in development. It seemed that every time I'd show my app to a friend it would crash, but it would never crash otherwise. After being generally mystified by the Murphy's Law aspect, I've…
Mark Chackerian
  • 21,866
  • 6
  • 108
  • 99
7
votes
3 answers

Large Memory Leak Using Reachability

Using Instruments on the device it detects a 3.50 KB memory leak using Apple's Reachability 2.0 code in my app. The Leaked Object is GeneralBlock-3584. The leaks tool points to the following code: - (BOOL) startNotifer { BOOL retVal = NO; …
Lauren Quantrell
  • 2,647
  • 6
  • 36
  • 49
7
votes
1 answer

copied the reachability-test from apple, but the linker gives a failure

i have tried to use the reachability-project published by apple to detect a reachability in an own example. i copied the most initialization, but i get this failure in the linker: Ld…
nico
  • 1,039
  • 4
  • 13
  • 27
7
votes
6 answers

Apple's reachability memory leak

I use apple's Reachabiliry class in my non-arc project. And when I run it with instruments to find memory leaks, it referes to Reachability method. Here is the problem: + (instancetype)reachabilityWithAddress:(const struct sockaddr_in…
Maria
  • 755
  • 1
  • 11
  • 29
7
votes
1 answer

AFNetworking: Using IP address, application cannot reach server

When I try to use an ip address instead of a hostname to tell an ios application in a simulator to talk to a local server the app hangs on the loading screen, waiting for a response from the server that never comes. I'm new with Objective C but the…
wanyo
  • 113
  • 8
7
votes
2 answers

How App in background can check for internet connection, IOS?

My Iphone app have 2 mode, online mode, and offline mode. if user is using app in online mode, the request gets submitted to server immediately. if user is using app in offline mode, i will store the request locally, so that i can upload it when…
RockandRoll
  • 409
  • 5
  • 23