From 6831f06685076dbbded4e78b2b89a09ee885f8fe Mon Sep 17 00:00:00 2001 From: Elad Katan Date: Mon, 24 Mar 2014 11:39:28 +0200 Subject: [PATCH] CB-6342 - iOS reports a cellular connection even when in Airplane mode --- src/ios/CDVConnection.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVConnection.m b/src/ios/CDVConnection.m index 3cfdc33..cbf4d69 100644 --- a/src/ios/CDVConnection.m +++ b/src/ios/CDVConnection.m @@ -52,8 +52,14 @@ return @"none"; case ReachableViaWWAN: - return @"cellular"; - + { + BOOL isConnectionRequired = [reachability connectionRequired]; + if (isConnectionRequired) { + return @"none"; + } else { + return @"cellular"; + } + } case ReachableViaWiFi: return @"wifi";