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
2
votes
1 answer

(iphone) reachability test for specific ip/port?

I've looked at Reachability sample from apple and another sample from "Iphone developer's cook book" Here are steps to test ip/port reachability construct sockaddr_in variable with given ip/port. call SCNetworkReachabilityCreateWithAddress with…
eugene
  • 39,839
  • 68
  • 255
  • 489
2
votes
1 answer

is "Turn Off Airplane Mode" alert deprecated?

I think I read somewhere that it was deprecated? and what is the alternatives? I'm talking about the boolean in the info.plist that says: SBUsesNetwork = YES. The alert shown says: Turn Off Airplane Mode or Use Wi-Fi to Access Data It has a…
neoneye
  • 50,398
  • 25
  • 166
  • 151
2
votes
2 answers

How to test reachability in iOS and retry to connect?

I want to test reachability when users lost connection when they are Logged and prompt them to try to connect again. first, I try using when unreachable closure and show UIalert says "Please check your internet connection and try again." with…
developer16
  • 195
  • 12
2
votes
0 answers

How can I determine if an iPhone's Wi-Fi is switched on?

I'm not talking about actually communicating over Wi-Fi, so testing the reachability of a host is not applicable here. iOS uses SSIDs to help geolocate you; you don't have to be connected to the Wi-Fi networks to gain that benefit, but you do have…
Oscar
  • 2,039
  • 2
  • 29
  • 39
2
votes
1 answer

How to check network connectivity changes for internet connection at run time with Reachability?

I am using this lib for checking Reachability And below is my sample code: override func viewWillAppear(_ animated: Bool) { let reachability = Reachability()! NotificationCenter.default.addObserver(self, selector:…
tabassum
  • 1,100
  • 6
  • 17
2
votes
0 answers

SKStoreReviewController.requestReview() freezes app when there's no cellular service, even when running on a background thread

I've included my code below. If there's no wifi and no cellular service, the app freezes. If I turn cellular off altogether, it prints ""Not reachable", which is expected, and the app works fine. But if there's no service and cellular is on, (for…
c0nman
  • 189
  • 1
  • 12
2
votes
2 answers

iOS Unexpected platform condition (expected 'os', 'arch', or 'swift') - Reachability

I just update my pods. after update Reachability causing an error Unexpected platform condition (expected 'os', 'arch', or 'swift') I tried to build and clean but it does not work. what's the solution? Please help me to fix this. Thanks in…
Anshul Arora
  • 155
  • 3
  • 10
2
votes
1 answer

iOS Reachability SCNetworkReachabilitySetCallback not call back when switch form wifi to anthor wifi

I want get a call when network is change of iPhone. I Use Reachability.m of Apple guide like this: xxx.m struct sockaddr_in zeroAddress; bzero(&zeroAddress, sizeof(zeroAddress)); zeroAddress.sin_len = sizeof(zeroAddress); zeroAddress.sin_family =…
waitianlou
  • 563
  • 3
  • 15
2
votes
2 answers

iOS multiple reachability needed

I am creating an iOS app with PhoneGap 0.9.3 and AsiHTTPRequest. They both use a 'reachability' file. PhoneGap uses version 1.5 AsiHTTPRequest uses version 2.0.4 They keep throwing up errors in combination, because there are lots of equal…
Wouter A
  • 151
  • 2
  • 13
2
votes
1 answer

WatchOS4 network reachability

I would like to determine if a Series3 watch is using Cellular for data transfer or able to use WiFi/Bluetooth. SystemConfiguration is not included in WatchOS, so the standard "Reachability" approach does not seem to be an option. (I am using…
John Robi
  • 345
  • 2
  • 8
2
votes
1 answer

iPhone Reachability - How can I use it across my entire app?

I have finally figured out how to use the apple Reachability files, which is a great thing. My question is, since I have about 6 views, each of which needs to check to see if I am connected to the internet. What is the best way to implement…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
2
votes
1 answer

Ashley Mills reachability not sending notification when wifi turns back on?

I have a set up, using Ashley Mills Reachability, which is supposed to send a notification, using NotificationCenter, to the application when the connection of the app changes. It is set up as follows: func reachabilityChanged(note: Notification)…
Runeaway3
  • 1,439
  • 1
  • 17
  • 43
2
votes
1 answer

SCNetworkReachabilityGetFlags in Reachability sample code takes too long to return

I'm using iOS4.1 on an iPhone4. I'm also using the latest version of the Reachability code. My device doesn't have a connection but it seems like the code waits to timeout or else the device takes ages to report back about the reachability status.…
Remover
  • 1,616
  • 1
  • 17
  • 27
2
votes
1 answer

Creating an easy to use extension/function for Reachability (host/internet WIFI, Cellular)

I am working on a complex app and I want to test both host in internet reachability on each ViewController that receive data from server I am currently using this library for Reachability https://github.com/ashleymills/Reachability.swift And I…
UncleJunior
  • 231
  • 1
  • 2
  • 12
2
votes
1 answer

How to detect host reachability in android?

In IOS we have implemented using Reachability framework which provided by apple, In Android We need to find whether active internet connection is available are not. Actually We need find whether Wi-fi connected with active internet connection or…