Prechádzať zdrojové kódy

new system define option brand (safer)

Marino Faggiana 8 rokov pred
rodič
commit
c6acda1f41

+ 27 - 28
iOSClient/AppDelegate.m

@@ -62,42 +62,41 @@
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
-
-#ifdef OPTION_FIREBASE_ENABLE
+    // Brand
+    if (k_option_use_firebase) {
     
-    /*
-    In order for this to work, proper GoogleService-Info.plist must be included
-    */
+        /*
+         In order for this to work, proper GoogleService-Info.plist must be included
+         */
     
-    @try {
-        [FIRApp configure];
-    } @catch (NSException *exception) {
-        NSLog(@"[LOG] Something went wrong while configuring Firebase");
-    }
+        @try {
+            [FIRApp configure];
+        } @catch (NSException *exception) {
+            NSLog(@"[LOG] Something went wrong while configuring Firebase");
+        }
     
-    if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) {
+        if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) {
         
-        UIUserNotificationType allNotificationTypes =(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
-        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
+            UIUserNotificationType allNotificationTypes =(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
+            UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
         
-        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
+            [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
         
-    } else {
-        
-        // iOS 10 or later
-        #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-        // For iOS 10 display notification (sent via APNS)
-        [UNUserNotificationCenter currentNotificationCenter].delegate = self;
-        UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
-        [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) {
-        }];
+        } else {
         
-        // For iOS 10 data message (sent via FCM)
-        [FIRMessaging messaging].remoteMessageDelegate = self;
-        #endif
+            // iOS 10 or later
+            #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
+            // For iOS 10 display notification (sent via APNS)
+            [UNUserNotificationCenter currentNotificationCenter].delegate = self;
+            UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
+            [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) {
+            }];
+        
+            // For iOS 10 data message (sent via FCM)
+            [FIRMessaging messaging].remoteMessageDelegate = self;
+            #endif
+        }
     }
-    
-#endif // OPTION_FIREBASE_ENABLE
 
     NSString *dir;
     NSURL *dirGroup = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:k_capabilitiesGroups];

+ 19 - 22
iOSClient/Brand/CCNextcloudConstant.h

@@ -22,30 +22,27 @@
 //
 
 // Brand
-#define k_brand                         @"Nextcloud"
-#define k_mailMe                        @"ios@nextcloud.com"
-#define k_textCopyright                 @"Nextcloud %@ © 2017 T.W.S. Inc."
-#define k_loginBaseUrl                  @"https://cloud.twsweb.it"
-#define k_pushNotificationServer        @"https://push-notifications.nextcloud.com"
-#define k_loginButtonLabelLink          @"https://nextcloud.com/providers"
-#define k_webLoginAutenticationProtocol @""
+#define k_brand                                 @"Nextcloud"
+#define k_mailMe                                @"ios@nextcloud.com"
+#define k_textCopyright                         @"Nextcloud %@ © 2017 T.W.S. Inc."
+#define k_loginBaseUrl                          @"https://cloud.twsweb.it"
+#define k_pushNotificationServer                @"https://push-notifications.nextcloud.com"
+#define k_loginButtonLabelLink                  @"https://nextcloud.com/providers"
+#define k_webLoginAutenticationProtocol         @""
 
 // Capabilities Group
-#define k_capabilitiesGroups            @"group.it.twsweb.Crypto-Cloud"
-
-/* Define option compiler */
-
-/*
- #define OPTION_DISABLE_INTRO
- #define NO_REQUEST_LOGIN_URL
- #define LOGIN_WEB
- 
- #define OPTION_FIREBASE_ENABLE
- 
- #define OPTION_MULTIUSER_DISABLE
- #define OPTION_CRYPTO_CLOUD_SYSTEM_DISABLE
- #define OPTION_AUTOMATIC_UPLOAD_ENABLE
-*/
+#define k_capabilitiesGroups                    @"group.it.twsweb.Crypto-Cloud"
+
+/* Define option Brand */
+
+#define k_option_use_login_web                  NO
+#define k_option_use_firebase                   NO
+#define k_option_use_default_automatic_upload   NO
+
+#define k_option_disable_intro                  NO
+#define k_option_disable_request_login_url      NO
+#define k_option_disable_multiaccount           NO
+#define k_option_disable_cryptocloudsystem      NO
 
 // -----------------------------------------------------------------------------------------------------------
 // COLOR

+ 23 - 19
iOSClient/FileSystem/CCCoreData.m

@@ -39,25 +39,29 @@
         
     record.account = account;
     record.active = [NSNumber numberWithBool:NO];
-    
-#ifdef OPTION_AUTOMATIC_UPLOAD_ENABLE
-    record.cameraUpload = [NSNumber numberWithBool:YES];
-    record.cameraUploadPhoto = [NSNumber numberWithBool:YES];
-    record.cameraUploadVideo = [NSNumber numberWithBool:YES];
-    
-    record.cameraUploadDatePhoto = [NSDate date];
-    record.cameraUploadDateVideo = [NSDate date];
-
-    record.cameraUploadWWAnPhoto = [NSNumber numberWithBool:NO];
-    record.cameraUploadWWAnVideo = [NSNumber numberWithBool:YES];
-#else
-    record.cameraUpload = [NSNumber numberWithBool:NO];
-    record.cameraUploadPhoto = [NSNumber numberWithBool:NO];
-    record.cameraUploadVideo = [NSNumber numberWithBool:NO];
-    
-    record.cameraUploadWWAnPhoto = [NSNumber numberWithBool:NO];
-    record.cameraUploadWWAnVideo = [NSNumber numberWithBool:NO];
-#endif
+        
+    // Brand
+    if (k_option_use_default_automatic_upload) {
+        
+        record.cameraUpload = [NSNumber numberWithBool:YES];
+        record.cameraUploadPhoto = [NSNumber numberWithBool:YES];
+        record.cameraUploadVideo = [NSNumber numberWithBool:YES];
+        
+        record.cameraUploadDatePhoto = [NSDate date];
+        record.cameraUploadDateVideo = [NSDate date];
+        
+        record.cameraUploadWWAnPhoto = [NSNumber numberWithBool:NO];
+        record.cameraUploadWWAnVideo = [NSNumber numberWithBool:YES];
+        
+    } else {
+        
+        record.cameraUpload = [NSNumber numberWithBool:NO];
+        record.cameraUploadPhoto = [NSNumber numberWithBool:NO];
+        record.cameraUploadVideo = [NSNumber numberWithBool:NO];
+        
+        record.cameraUploadWWAnPhoto = [NSNumber numberWithBool:NO];
+        record.cameraUploadWWAnVideo = [NSNumber numberWithBool:NO];
+    }
     
     record.cameraUploadCryptatedPhoto = [NSNumber numberWithBool:NO];
     record.cameraUploadCryptatedVideo = [NSNumber numberWithBool:NO];

+ 7 - 5
iOSClient/Login/CCLogin.m

@@ -63,11 +63,13 @@
     self.bottomLabel.hidden = YES;
 #endif
     
-#ifdef NO_REQUEST_LOGIN_URL
-    _baseUrl.text = k_loginBaseUrl;
-    _imageBaseUrl.hidden = YES;
-    _baseUrl.hidden = YES;
-#endif
+    // Brand
+    if (k_option_disable_request_login_url) {
+        
+        _baseUrl.text = k_loginBaseUrl;
+        _imageBaseUrl.hidden = YES;
+        _baseUrl.hidden = YES;
+    }
     
     [self.baseUrl setDelegate:self];
     [self.password setDelegate:self];

+ 21 - 17
iOSClient/Main/CCMain.m

@@ -1014,21 +1014,25 @@
 
 - (void)changePasswordAccount
 {
-#ifdef LOGIN_WEB
-    _loginWeb = [CCLoginWeb new];
-    _loginWeb.delegate = self;
-    _loginWeb.loginType = loginModifyPasswordUser;
+    // Brand
+    if (k_option_use_login_web) {
     
-    dispatch_async(dispatch_get_main_queue(), ^ {
-        [_loginWeb presentModalWithDefaultTheme:self];
-    });
-#else
-    _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-    _loginVC.delegate = self;
-    _loginVC.loginType = loginModifyPasswordUser;
+        _loginWeb = [CCLoginWeb new];
+        _loginWeb.delegate = self;
+        _loginWeb.loginType = loginModifyPasswordUser;
     
-    [self presentViewController:_loginVC animated:YES completion:nil];
-#endif
+        dispatch_async(dispatch_get_main_queue(), ^ {
+            [_loginWeb presentModalWithDefaultTheme:self];
+        });
+        
+    } else {
+        
+        _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
+        _loginVC.delegate = self;
+        _loginVC.loginType = loginModifyPasswordUser;
+    
+        [self presentViewController:_loginVC animated:YES completion:nil];
+    }
 }
 
 #pragma mark -
@@ -3246,7 +3250,9 @@
     if (app.reSelectMenu.isOpen || app.reMainMenu.isOpen)
         return;
     
-#ifndef OPTION_MULTIUSER_DISABLE
+    // Brand
+    if (k_option_disable_multiaccount)
+        return;
     
     if ([app.netQueue operationCount] > 0 || [app.netQueueDownload operationCount] > 0 || [app.netQueueDownloadWWan operationCount] > 0 || [app.netQueueUpload operationCount] > 0 || [app.netQueueUploadWWan operationCount] > 0 || [CCCoreData countTableAutomaticUploadForAccount:app.activeAccount selector:nil] > 0) {
         
@@ -3305,9 +3311,7 @@
     rect.size.height = rect.size.height - originY;
     
     [CCMenuAccount setTitleFont:[UIFont systemFontOfSize:12.0]];
-    [CCMenuAccount showMenuInView:self.navigationController.view fromRect:rect menuItems:menuArray withOptions:options];
-    
-#endif
+    [CCMenuAccount showMenuInView:self.navigationController.view fromRect:rect menuItems:menuArray withOptions:options];    
 }
 
 - (void)changeDefaultAccount:(CCMenuItem *)sender

+ 25 - 24
iOSClient/Main/CCSplit.m

@@ -107,27 +107,25 @@
 
 - (void)showIntro
 {
-    
-#ifdef OPTION_DISABLE_INTRO
+    // Brand
+    if (k_option_disable_intro) {
 
-    [CCUtility setIntro:@"1.0"];
+        [CCUtility setIntro:@"1.0"];
     
-    [self performSelector:@selector(newAccount) withObject:nil afterDelay:0.1];
+        [self performSelector:@selector(newAccount) withObject:nil afterDelay:0.1];
 
-#else
+    } else {
     
-    if ([CCUtility getIntro:@"1.0"] == NO) {
+        if ([CCUtility getIntro:@"1.0"] == NO) {
         
-        _intro = [[CCIntro alloc] initWithDelegate:self delegateView:self.view];
-        [_intro showIntroCryptoCloud:0.0];
+            _intro = [[CCIntro alloc] initWithDelegate:self delegateView:self.view];
+            [_intro showIntroCryptoCloud:0.0];
         
-    } else {
+        } else {
         
-        [self performSelector:@selector(newAccount) withObject:nil afterDelay:0.1];
+            [self performSelector:@selector(newAccount) withObject:nil afterDelay:0.1];
+        }
     }
-    
-#endif
-    
 }
 
 - (void)introWillFinish:(EAIntroView *)introView wasSkipped:(BOOL)wasSkipped
@@ -149,20 +147,23 @@
 {
     if (app.activeAccount.length == 0) {
     
-#ifdef LOGIN_WEB
+        // Brand
+        if (k_option_use_login_web) {
         
-        _loginWeb = [CCLoginWeb new];
-        _loginWeb.delegate = self;
-        _loginWeb.loginType = loginAddForced;
+            _loginWeb = [CCLoginWeb new];
+            _loginWeb.delegate = self;
+            _loginWeb.loginType = loginAddForced;
         
-        [_loginWeb presentModalWithDefaultTheme:self];
-#else
-        _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-        _loginVC.delegate = self;
-        _loginVC.loginType = loginAddForced;
+            [_loginWeb presentModalWithDefaultTheme:self];
+            
+        } else {
+            
+            _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
+            _loginVC.delegate = self;
+            _loginVC.loginType = loginAddForced;
         
-        [self presentViewController:_loginVC animated:YES completion:nil];
-#endif
+            [self presentViewController:_loginVC animated:YES completion:nil];
+        }
     }
 }
 

+ 69 - 60
iOSClient/Settings/CCManageAccount.m

@@ -121,16 +121,18 @@
     if (listAccount.count == 0) row.disabled = @YES;
     [section addFormRow:row];
 
-#ifndef OPTION_MULTIUSER_DISABLE
-    // New Account nextcloud
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccountNextcloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_nextcloud_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:[UIImage imageNamed:image_settingsAccountNextcloud] forKey:@"imageView.image"];
-    [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
-    row.action.formSelector = @selector(addAccount:);
-    [section addFormRow:row];
-#endif
+    // Brand
+    if (k_option_disable_multiaccount == NO) {
+    
+        // New Account nextcloud
+        row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccountNextcloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_nextcloud_", nil)];
+        [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+        [row.cellConfig setObject:[UIImage imageNamed:image_settingsAccountNextcloud] forKey:@"imageView.image"];
+        [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
+        [row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
+        row.action.formSelector = @selector(addAccount:);
+        [section addFormRow:row];
+    }
     
     // delete Account
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"delAccount" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_delete_account_", nil)];
@@ -196,44 +198,48 @@
     [app cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
-#ifdef LOGIN_WEB
+    // Brand
+    if (k_option_use_login_web) {
     
-    _loginWeb = [CCLoginWeb new];
-    _loginWeb.delegate = self;
-    _loginWeb.loginType = loginAdd;
+        _loginWeb = [CCLoginWeb new];
+        _loginWeb.delegate = self;
+        _loginWeb.loginType = loginAdd;
     
-    [_loginWeb presentModalWithDefaultTheme:self];
-    
-#else
-    _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-    _loginVC.delegate = self;
-    _loginVC.loginType = loginAdd;
-    
-    [self presentViewController:_loginVC animated:YES completion:nil];
+        [_loginWeb presentModalWithDefaultTheme:self];
+        
+    } else {
+  
+        _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
+        _loginVC.delegate = self;
+        _loginVC.loginType = loginAdd;
     
-#endif
+        [self presentViewController:_loginVC animated:YES completion:nil];
+    }
 }
 
 - (void)addAccountFoced
 {
-#ifdef LOGIN_WEB
-    
-    _loginWeb = [CCLoginWeb new];
-    _loginWeb.delegate = self;
-    _loginWeb.loginType = loginAddForced;
+    // Brand
+    if (k_option_use_login_web) {
     
-    dispatch_async(dispatch_get_main_queue(), ^ {
-        [_loginWeb presentModalWithDefaultTheme:self];
-    });
-#else
-    _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-    _loginVC.delegate = self;
-    _loginVC.loginType = loginAddForced;
+        _loginWeb = [CCLoginWeb new];
+        _loginWeb.delegate = self;
+        _loginWeb.loginType = loginAddForced;
     
-    dispatch_async(dispatch_get_main_queue(), ^ {
-        [self presentViewController:_loginVC animated:YES completion:nil];
-    });
-#endif
+        dispatch_async(dispatch_get_main_queue(), ^ {
+            [_loginWeb presentModalWithDefaultTheme:self];
+        });
+        
+    } else {
+        
+        _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
+        _loginVC.delegate = self;
+        _loginVC.loginType = loginAddForced;
+        
+        dispatch_async(dispatch_get_main_queue(), ^ {
+            [self presentViewController:_loginVC animated:YES completion:nil];
+        });
+    }
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -247,24 +253,27 @@
     [app cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
-#ifdef LOGIN_WEB
+    // Brand
+    if (k_option_use_login_web) {
     
-    _loginWeb = [CCLoginWeb new];
-    _loginWeb.delegate = self;
-    _loginWeb.loginType = loginModifyPasswordUser;
+        _loginWeb = [CCLoginWeb new];
+        _loginWeb.delegate = self;
+        _loginWeb.loginType = loginModifyPasswordUser;
     
-    dispatch_async(dispatch_get_main_queue(), ^ {
-        [_loginWeb presentModalWithDefaultTheme:self];
-    });
-#else
-    _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
-    _loginVC.delegate = self;
-    _loginVC.loginType = loginModifyPasswordUser;
+        dispatch_async(dispatch_get_main_queue(), ^ {
+            [_loginWeb presentModalWithDefaultTheme:self];
+        });
+
+    } else {
+        
+        _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
+        _loginVC.delegate = self;
+        _loginVC.loginType = loginModifyPasswordUser;
     
-    dispatch_async(dispatch_get_main_queue(), ^ {
-        [self presentViewController:_loginVC animated:YES completion:nil];
-    });
-#endif
+        dispatch_async(dispatch_get_main_queue(), ^ {
+            [self presentViewController:_loginVC animated:YES completion:nil];
+        });
+    }
     
     [self UpdateForm];
 }
@@ -404,27 +413,27 @@
     XLFormRowDescriptor *rowUserTwitter = [self.form formRowWithTag:@"usertwitter"];
 
     rowUserFullName.value = _tableAccount.displayName;
-    if ([_tableAccount.displayName isEqualToString:@""]) rowUserFullName.hidden = @YES;
+    if ([_tableAccount.displayName isEqualToString:@""] || _tableAccount.displayName == nil) rowUserFullName.hidden = @YES;
     else rowUserFullName.hidden = @NO;
     
     rowUserAddress.value = _tableAccount.address;
-    if ([_tableAccount.address isEqualToString:@""]) rowUserAddress.hidden = @YES;
+    if ([_tableAccount.address isEqualToString:@""] || _tableAccount.address == nil) rowUserAddress.hidden = @YES;
     else rowUserAddress.hidden = @NO;
     
     rowUserPhone.value = _tableAccount.phone;
-    if ([_tableAccount.phone isEqualToString:@""]) rowUserPhone.hidden = @YES;
+    if ([_tableAccount.phone isEqualToString:@""] || _tableAccount.phone == nil) rowUserPhone.hidden = @YES;
     else rowUserPhone.hidden = @NO;
     
     rowUserEmail.value = _tableAccount.email;
-    if ([_tableAccount.email isEqualToString:@""]) rowUserEmail.hidden = @YES;
+    if ([_tableAccount.email isEqualToString:@""] || _tableAccount.email == nil) rowUserEmail.hidden = @YES;
     else rowUserEmail.hidden = @NO;
     
     rowUserWeb.value = _tableAccount.webpage;
-    if ([_tableAccount.webpage isEqualToString:@""]) rowUserWeb.hidden = @YES;
+    if ([_tableAccount.webpage isEqualToString:@""] || _tableAccount.webpage == nil) rowUserWeb.hidden = @YES;
     else rowUserWeb.hidden = @NO;
     
     rowUserTwitter.value = _tableAccount.twitter;
-    if ([_tableAccount.twitter isEqualToString:@""]) rowUserTwitter.hidden = @YES;
+    if ([_tableAccount.twitter isEqualToString:@""] || _tableAccount.twitter == nil) rowUserTwitter.hidden = @YES;
     else rowUserTwitter.hidden = @NO;
 
     [self.tableView reloadData];

+ 13 - 11
iOSClient/Settings/CCSettings.m

@@ -136,20 +136,22 @@
     [row.cellConfig setObject:[UIImage imageNamed:image_settingsFavoriteOffline] forKey:@"imageView.image"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [section addFormRow:row];
-
-#ifndef OPTION_CRYPTO_CLOUD_SYSTEM_DISABLE
+    
     // Section CRYPTO CLOUD SYSTEM ------------------------------------------
     
-    section = [XLFormSectionDescriptor formSection];
-    [form addFormSection:section];
+    // Brand
+    if (k_option_disable_cryptocloudsystem == NO) {
     
-    // Crypto Cloud
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"cryptocloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_crypto_cloud_system_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:[UIImage imageNamed:image_settingsCryptoCloud] forKey:@"imageView.image"];
-    row.action.viewControllerClass = [CCManageCryptoCloud class];
-    [section addFormRow:row];
-#endif
+        section = [XLFormSectionDescriptor formSection];
+        [form addFormSection:section];
+    
+        // Crypto Cloud
+        row = [XLFormRowDescriptor formRowDescriptorWithTag:@"cryptocloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_crypto_cloud_system_", nil)];
+        [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+        [row.cellConfig setObject:[UIImage imageNamed:image_settingsCryptoCloud] forKey:@"imageView.image"];
+        row.action.viewControllerClass = [CCManageCryptoCloud class];
+        [section addFormRow:row];
+    }
     
     // Section : INFORMATION ------------------------------------------------