marinofaggiana 4 жил өмнө
parent
commit
c0a3fcdcaa

+ 4 - 1
iOSClient/Utility/CCUtility.m

@@ -552,15 +552,18 @@
 + (void)setCertificateError:(NSString *)account error:(BOOL)error
 {
     // In background do not write the error
+#if !defined(EXTENSION)
     UIApplicationState state = [[UIApplication sharedApplication] applicationState];
     if (error && (state == UIApplicationStateBackground || state == UIApplicationStateInactive)) {
         return;
     }
-    
     NSString *key = [@"certificateError" stringByAppendingString:account];
     NSString *sError = (error) ? @"true" : @"false";
     
     [UICKeyChainStore setString:sError forKey:key service:NCGlobal.shared.serviceShareKeyChain];
+#else
+    return;
+#endif
 }
 
 + (BOOL)getDisableLocalCacheAfterUpload

+ 4 - 1
iOSClient/Utility/NCUtility.swift

@@ -502,6 +502,7 @@ class NCUtility: NSObject {
             self.viewActivityIndicator?.layer.masksToBounds = true
             self.viewActivityIndicator?.backgroundColor = .clear
 
+#if !EXTENSION
             if backgroundView == nil {
                 if let window = UIApplication.shared.keyWindow {
                     self.viewBackgroundActivityIndicator?.removeFromSuperview()
@@ -513,7 +514,9 @@ class NCUtility: NSObject {
             } else {
                 self.viewBackgroundActivityIndicator = backgroundView
             }
-            
+#else
+            self.viewBackgroundActivityIndicator = backgroundView
+#endif
             // VIEW ACTIVITY INDICATOR
             
             guard let viewActivityIndicator = self.viewActivityIndicator else { return }