reachability

How do I know whether my iPhone/iPad is connected to 2G or 3G? [duplicate]

柔情痞子 提交于 2019-12-01 03:00:54
This question already has an answer here: Determining 3G vs Edge 5 answers I was trying to check wether the device is connected via 2G (GPRS, EDGE) or 3G (UMTS, HSDPA). I only found the Reachability example class from here (Apple Dev Example) This example only check wether its Wifi or WWAN. I wanna use it to decide wether I download the small data or the huge files. As it is big different between GRPS and UMTS. Is it possible to distinguish 2G and 3G? pdrcabrod This is totally possible in iOS7. Please check this answer Hope this helps Since you can not get this information the official way,

How do I repeat a Reachability test until it works

点点圈 提交于 2019-11-30 16:14:02
问题 I have an initial tableviewcontroller which is executing a reachability check. This is working without a problem within the viewDidLoad , however I would like to know the correct way to Retry the connection until it passes. The pertinent code in my implementation file is below, I have tried inserting [self ViewDidLoad] if the connection is down but this just sets the app into a loop (returning the connection failure NSLog message) and not showing the UIAlertView . - (void)viewDidLoad { [super

Unity check internet connection availability

孤人 提交于 2019-11-30 10:16:28
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 solution in any forum. I want to check whether wi-fi or GPRS is on or not which should work for iOS and Android. Thanks in advance. Solution Application.internetReachability is what you need. In conjunction with Ping , probably. Here's an example: using UnityEngine; public class InternetChecker : MonoBehaviour { private const bool

Reachability and IPv6

筅森魡賤 提交于 2019-11-30 08:27:55
One of my project uses the Apple's Reachability class in order to be monitor the network state and be notified in case of changes. After reading this article about supporting IPv6 I was wondering if were to be made to this class to make it work with IPv6. I set up an IPv6 network following the same article and everything seems to work fine but maybe there is an issue with the setup. Is the part of the Reachability class checking the Internet connection working with IPv6 as it is now or does it need some changes? Andrew Y Short answer from Apple itself ( https://developer.apple.com/videos/play

How to get Reachability Notifications in iOS in Background when dropping Wi-Fi network?

时间秒杀一切 提交于 2019-11-29 21:29:05
I'm using Reachability successfully to determine the status of the network, and to be notified of changes (e.g. Reachability Guide for iOS 4 ). My question isn't how to get Reachability up and running, but rather the following. My AppDelegate handles the Reachability stuff. The app receives notifications ( kReachabilityChangedNotification ) while the app is running, and when the app is in the Background ( applicationDidEnterBackground: ). The app is designed to reload a playing audio stream when it notices that it's lost a Wi-Fi connection, e.g. To test, I turned Wi-Fi on and off in Settings,

How do I receive notifications that the connection has changed type (3G, Edge, Wifi, GPRS)

我的未来我决定 提交于 2019-11-29 17:07:19
Is there a way to discover whether the current connection is 3G, Edge or WiFi, and receive a notification of this? Or just a way do discover whether the connection is WiFi? You should use Apple's Reachability class http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html after implementation you can use this in the delegate: - (void) configureTextField: (Reachability*) curReach { NetworkStatus netStatus = [curReach currentReachabilityStatus]; BOOL connectionRequired= [curReach connectionRequired]; NSString* statusString= @"non"; switch (netStatus) {

Unity check internet connection availability

送分小仙女□ 提交于 2019-11-29 15:19:36
问题 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 solution in any forum. I want to check whether wi-fi or GPRS is on or not which should work for iOS and Android. Thanks in advance. 回答1: Solution Application.internetReachability is what you need. In conjunction with Ping, probably. Here's an

Using 'stringWithString:' with a literal is redundant [duplicate]

廉价感情. 提交于 2019-11-29 14:44:24
This question already has an answer here: Obj-C: [NSString stringWithString:@“string”] vs. @“string” 3 answers i used this code in reachability class that is in ios6 switch (status) { case kNotReachable: statusString = [NSString stringWithString: @"Not Reachable"]; break; case kReachableViaWWAN: statusString = [NSString stringWithString: @"Reachable via WWAN"]; break; case kReachableViaWiFi: statusString = [NSString stringWithString: @"Reachable via WiFi"]; break; } but the following error is occurred "Using 'stringWithString:' with a literal is redundant" The warning is saying that you could

Reachability and IPv6

≡放荡痞女 提交于 2019-11-29 11:19:52
问题 One of my project uses the Apple's Reachability class in order to be monitor the network state and be notified in case of changes. After reading this article about supporting IPv6 I was wondering if were to be made to this class to make it work with IPv6. I set up an IPv6 network following the same article and everything seems to work fine but maybe there is an issue with the setup. Is the part of the Reachability class checking the Internet connection working with IPv6 as it is now or does

Using Reachability for Internet *or* local WiFi?

五迷三道 提交于 2019-11-29 09:29:33
I've searched SO for the answer to this question, and it's not really addressed, at least not to a point where I can make it work. I was originally only checking for Internet reachability, using: self.wwanReach = [Reachability reachabilityWithHostName:@"www.apple.com"]; [wwanReach startNotifer]; I now need to support a local WiFi connection (in the absence of reaching the Internet in general), and when I found +reachabilityForLocalWiFi , I also noticed there was +reachabilityForInternetConnection . I figured I could use these, instead of hard-coding "www.apple.com" in there, but alas, when I