mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-18 21:52:48 +08:00
[CB-2686] Update Connection reachability to 'cellular' and remove deprecation notice.
This commit is contained in:
parent
7abafdf621
commit
b6b48e9d6e
@ -52,8 +52,7 @@
|
||||
return @"none";
|
||||
|
||||
case ReachableViaWWAN:
|
||||
// Return value of '2g' is deprecated as of 2.6.0 and will be replaced with 'cellular' in 3.0.0
|
||||
return @"2g";
|
||||
return @"cellular";
|
||||
|
||||
case ReachableViaWiFi:
|
||||
return @"wifi";
|
||||
@ -113,7 +112,6 @@
|
||||
self.internetReach = [CDVReachability reachabilityForInternetConnection];
|
||||
self.connectionType = [self w3cConnectionTypeFor:self.internetReach];
|
||||
[self.internetReach startNotifier];
|
||||
[self printDeprecationNotice];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:)
|
||||
name:kReachabilityChangedNotification object:nil];
|
||||
if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) {
|
||||
@ -124,9 +122,4 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)printDeprecationNotice
|
||||
{
|
||||
NSLog(@"DEPRECATION NOTICE: The Connection ReachableViaWWAN return value of '2g' is deprecated as of Cordova version 2.6.0 and will be changed to 'cellular' in a future release. ");
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user