From 2fd3c1cc438c47cb2024a3054aa7f0247e632346 Mon Sep 17 00:00:00 2001 From: Connor Pearson Date: Wed, 18 Jan 2017 10:21:46 -0500 Subject: [PATCH] CB-12751: (ios) Fix connection type when airplane mode is on This closes #54 --- 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 6715322..40b2e42 100644 --- a/src/ios/CDVConnection.m +++ b/src/ios/CDVConnection.m @@ -88,8 +88,14 @@ } } case ReachableViaWiFi: - return @"wifi"; - + { + BOOL isConnectionRequired = [reachability connectionRequired]; + if (isConnectionRequired) { + return @"none"; + } else { + return @"wifi"; + } + } default: return @"unknown"; }