Browse Source

networkReachabilityObserver

Marino Faggiana 1 năm trước cách đây
mục cha
commit
e03bdf0bdc
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      iOSClient/Networking/NCNetworking.swift

+ 2 - 2
iOSClient/Networking/NCNetworking.swift

@@ -125,10 +125,11 @@ class NCNetworking: NSObject, NKCommonDelegate {
 
     func networkReachabilityObserver(_ typeReachability: NKCommon.TypeReachability) {
 
-#if !EXTENSION
         if typeReachability == NKCommon.TypeReachability.reachableCellular || typeReachability == NKCommon.TypeReachability.reachableEthernetOrWiFi {
             if !lastReachability {
+#if !EXTENSION
                 NCService.shared.startRequestServicesServer()
+#endif
             }
             lastReachability = true
         } else {
@@ -139,7 +140,6 @@ class NCNetworking: NSObject, NKCommonDelegate {
             lastReachability = false
         }
         networkReachability = typeReachability
-#endif
     }
 
     func authenticationChallenge(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {