Browse Source

Update `isRunningOnDevice` to use `targetEnvironment(simulator)`. Update `.swift-version` to 4.1.

Daniel Storm 7 years ago
parent
commit
03621a3fe8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      .swift-version
  2. 1 1
      Reachability/Reachability.swift

+ 1 - 1
.swift-version

@@ -1 +1 @@
-4
+4.1

+ 1 - 1
Reachability/Reachability.swift

@@ -133,7 +133,7 @@ public class Reachability {
     fileprivate var previousFlags: SCNetworkReachabilityFlags?
     
     fileprivate var isRunningOnDevice: Bool = {
-        #if (arch(i386) || arch(x86_64)) && os(iOS)
+        #if targetEnvironment(simulator)
             return false
         #else
             return true