Repository: cordova-plugin-network-information
Updated Branches:
  refs/heads/master 7f5d03e69 -> 2fd3c1cc4


CB-12751: (ios) Fix connection type when airplane mode is on

 This closes #54


Project: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/2fd3c1cc
Tree: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/2fd3c1cc
Diff: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/2fd3c1cc

Branch: refs/heads/master
Commit: 2fd3c1cc438c47cb2024a3054aa7f0247e632346
Parents: 7f5d03e
Author: Connor Pearson <cpear...@b2wsoftware.com>
Authored: Wed Jan 18 10:21:46 2017 -0500
Committer: Julio César <jcesarmob...@gmail.com>
Committed: Tue Oct 10 23:07:31 2017 +0200

----------------------------------------------------------------------
 src/ios/CDVConnection.m | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/2fd3c1cc/src/ios/CDVConnection.m
----------------------------------------------------------------------
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";
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to