NCSettings.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. //
  2. // NCSettings.m
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 24/11/14.
  6. // Copyright (c) 2014 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. #import "NCSettings.h"
  24. #import "CCAdvanced.h"
  25. #import "CCManageAccount.h"
  26. #import "CCManageAutoUpload.h"
  27. #import "NCManageEndToEndEncryption.h"
  28. #import "NCBridgeSwift.h"
  29. #import "NSNotificationCenter+MainThread.h"
  30. #import <LocalAuthentication/LocalAuthentication.h>
  31. #import <TOPasscodeViewController/TOPasscodeViewController.h>
  32. #define alertViewEsci 1
  33. #define alertViewAzzeraCache 2
  34. @interface NCSettings () <TOPasscodeSettingsViewControllerDelegate, TOPasscodeViewControllerDelegate>
  35. {
  36. AppDelegate *appDelegate;
  37. TOPasscodeViewController *passcodeViewController;
  38. TOPasscodeSettingsViewController *passcodeSettingsViewController;
  39. }
  40. @end
  41. @implementation NCSettings
  42. - (void)initializeForm
  43. {
  44. XLFormDescriptor *form = [XLFormDescriptor formDescriptor];
  45. XLFormSectionDescriptor *section;
  46. XLFormRowDescriptor *row;
  47. //NSInteger serverVersionMajor = [[NCManageDatabase shared] getCapabilitiesServerIntWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionMajor];
  48. form.rowNavigationOptions = XLFormRowNavigationOptionNone;
  49. // Section AUTO UPLOAD OF CAMERA IMAGES ----------------------------
  50. section = [XLFormSectionDescriptor formSection];
  51. [form addFormSection:section];
  52. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_settings_autoupload_", nil)];
  53. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  54. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  55. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  56. [row.cellConfig setObject:[[UIImage imageNamed:@"autoUpload"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  57. row.action.viewControllerClass = [CCManageAutoUpload class];
  58. [section addFormRow:row];
  59. // Section : LOCK --------------------------------------------------------------
  60. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_lock_", nil)];
  61. [form addFormSection:section];
  62. // Lock active YES/NO
  63. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"bloccopasscode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_lock_not_active_", nil)];
  64. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  65. [row.cellConfig setObject:[[UIImage imageNamed:@"lock.open"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  66. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  67. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  68. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  69. //[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
  70. row.action.formSelector = @selector(passcode:);
  71. [section addFormRow:row];
  72. // Enable Touch ID
  73. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"enableTouchDaceID" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_enable_touch_face_id_", nil)];
  74. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  75. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  76. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  77. [section addFormRow:row];
  78. // Lock no screen
  79. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"notPasscodeAtStart" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_no_screen_", nil)];
  80. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  81. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  82. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  83. [section addFormRow:row];
  84. // Section : Screen --------------------------------------------------------------
  85. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_screen_", nil)];
  86. [form addFormSection:section];
  87. // Dark Mode
  88. if (@available(iOS 13.0, *)) {
  89. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkModeDetect" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_dark_mode_detect_", nil)];
  90. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  91. [row.cellConfig setObject:[[UIImage imageNamed:@"themeLightDark"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  92. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  93. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  94. if ([CCUtility getDarkModeDetect]) row.value = @1;
  95. else row.value = @0;
  96. [section addFormRow:row];
  97. } else {
  98. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkMode" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_dark_mode_", nil)];
  99. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  100. [row.cellConfig setObject:[[UIImage imageNamed:@"themeLightDark"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  101. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  102. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  103. if ([CCUtility getDarkMode]) row.value = @1;
  104. else row.value = @0;
  105. [section addFormRow:row];
  106. }
  107. // Section : E2EEncryption --------------------------------------------------------------
  108. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_e2e_settings_title_", nil)];
  109. [form addFormSection:section];
  110. // EndToEnd Encryption
  111. NSString *title = [NSString stringWithFormat:@"%@ (%@)",NSLocalizedString(@"_e2e_settings_", nil), NSLocalizedString(@"_experimental_", nil)];
  112. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"e2eEncryption" rowType:XLFormRowDescriptorTypeButton title:title];
  113. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  114. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  115. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  116. [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  117. row.action.viewControllerClass = [NCManageEndToEndEncryption class];
  118. [section addFormRow:row];
  119. // Section Advanced -------------------------------------------------
  120. section = [XLFormSectionDescriptor formSection];
  121. [form addFormSection:section];
  122. // Advanced
  123. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"advanced" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_advanced_", nil)];
  124. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  125. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  126. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  127. [row.cellConfig setObject:[[UIImage imageNamed:@"gear"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  128. row.action.viewControllerClass = [CCAdvanced class];
  129. [section addFormRow:row];
  130. // Section : INFORMATION ------------------------------------------------
  131. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_information_", nil)];
  132. [form addFormSection:section];
  133. // Acknowledgements
  134. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
  135. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundView;
  136. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  137. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  138. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  139. [row.cellConfig setObject:[[UIImage imageNamed:@"acknowledgements"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  140. row.action.formBlock = ^(XLFormRowDescriptor * sender){
  141. [self performSegueWithIdentifier:@"AcknowledgementsSegue" sender:sender];
  142. [self deselectFormRow:sender];
  143. };
  144. [section addFormRow:row];
  145. if (!NCBrandOptions.shared.disable_crash_service) {
  146. }
  147. self.tableView.showsVerticalScrollIndicator = NO;
  148. self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 35, 0);
  149. self.form = form;
  150. }
  151. #pragma mark - Life Cycle
  152. - (void)viewDidLoad
  153. {
  154. [super viewDidLoad];
  155. self.title = NSLocalizedString(@"_settings_", nil);
  156. appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  157. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:NCGlobal.shared.notificationCenterChangeTheming object:nil];
  158. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground) name:NCGlobal.shared.notificationCenterApplicationDidEnterBackground object:nil];
  159. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initializeMain) name:NCGlobal.shared.notificationCenterInitializeMain object:nil];
  160. [self changeTheming];
  161. }
  162. - (void)viewWillAppear:(BOOL)animated
  163. {
  164. [super viewWillAppear:animated];
  165. appDelegate.activeViewController = self;
  166. [self initializeForm];
  167. [self reloadForm];
  168. }
  169. #pragma mark - NotificationCenter
  170. - (void)changeTheming
  171. {
  172. self.view.backgroundColor = NCBrandColor.shared.backgroundForm;
  173. self.tableView.backgroundColor = NCBrandColor.shared.backgroundForm;
  174. [self initializeForm];
  175. [self reloadForm];
  176. }
  177. - (void)initializeMain
  178. {
  179. [self initializeForm];
  180. [self reloadForm];
  181. }
  182. - (void)applicationDidEnterBackground
  183. {
  184. if (passcodeViewController.view.window != nil) {
  185. [passcodeViewController dismissViewControllerAnimated:true completion:nil];
  186. }
  187. if (passcodeSettingsViewController.view.window != nil) {
  188. [passcodeSettingsViewController dismissViewControllerAnimated:true completion:nil];
  189. }
  190. }
  191. #pragma mark -
  192. - (void)reloadForm
  193. {
  194. self.form.delegate = nil;
  195. // ------------------------------------------------------------------
  196. XLFormRowDescriptor *rowBloccoPasscode = [self.form formRowWithTag:@"bloccopasscode"];
  197. XLFormRowDescriptor *rowNotPasscodeAtStart = [self.form formRowWithTag:@"notPasscodeAtStart"];
  198. XLFormRowDescriptor *rowEnableTouchDaceID = [self.form formRowWithTag:@"enableTouchDaceID"];
  199. XLFormRowDescriptor *rowDarkModeDetect = [self.form formRowWithTag:@"darkModeDetect"];
  200. XLFormRowDescriptor *rowDarkMode = [self.form formRowWithTag:@"darkMode"];
  201. // ------------------------------------------------------------------
  202. if ([[CCUtility getPasscode] length]) {
  203. rowBloccoPasscode.title = NSLocalizedString(@"_lock_active_", nil);
  204. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  205. } else {
  206. rowBloccoPasscode.title = NSLocalizedString(@"_lock_not_active_", nil);
  207. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"lock.open"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  208. }
  209. if ([CCUtility getEnableTouchFaceID]) [rowEnableTouchDaceID setValue:@1]; else [rowEnableTouchDaceID setValue:@0];
  210. if ([CCUtility getNotPasscodeAtStart]) [rowNotPasscodeAtStart setValue:@1]; else [rowNotPasscodeAtStart setValue:@0];
  211. if ([CCUtility getDarkModeDetect]) [rowDarkModeDetect setValue:@1]; else [rowDarkModeDetect setValue:@0];
  212. if ([CCUtility getDarkMode]) [rowDarkMode setValue:@1]; else [rowDarkMode setValue:@0];
  213. // -----------------------------------------------------------------
  214. [self.tableView reloadData];
  215. self.form.delegate = self;
  216. }
  217. - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue
  218. {
  219. [super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
  220. if ([rowDescriptor.tag isEqualToString:@"notPasscodeAtStart"]) {
  221. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  222. [CCUtility setNotPasscodeAtStart:true];
  223. } else {
  224. [CCUtility setNotPasscodeAtStart:false];
  225. }
  226. }
  227. if ([rowDescriptor.tag isEqualToString:@"enableTouchDaceID"]) {
  228. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  229. [CCUtility setEnableTouchFaceID:true];
  230. } else {
  231. [CCUtility setEnableTouchFaceID:false];
  232. }
  233. }
  234. if ([rowDescriptor.tag isEqualToString:@"darkMode"]) {
  235. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  236. [CCUtility setDarkMode:true];
  237. } else {
  238. [CCUtility setDarkMode:false];
  239. }
  240. [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCGlobal.shared.notificationCenterChangeTheming object:nil];
  241. }
  242. if ([rowDescriptor.tag isEqualToString:@"darkModeDetect"]) {
  243. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  244. [CCUtility setDarkModeDetect:true];
  245. // detect Dark Mode
  246. if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
  247. [CCUtility setDarkMode:YES];
  248. } else {
  249. [CCUtility setDarkMode:NO];
  250. }
  251. } else {
  252. [CCUtility setDarkModeDetect:false];
  253. [CCUtility setDarkMode:false];
  254. }
  255. [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCGlobal.shared.notificationCenterChangeTheming object:nil];
  256. }
  257. }
  258. #pragma mark - Passcode
  259. - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  260. {
  261. [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions shared] brand] reply:^(BOOL success, NSError * _Nullable error) {
  262. if (success) {
  263. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
  264. [CCUtility setPasscode:@""];
  265. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  266. [self reloadForm];
  267. });
  268. }
  269. }];
  270. }
  271. - (void)passcodeSettingsViewController:(TOPasscodeSettingsViewController *)passcodeSettingsViewController didChangeToNewPasscode:(NSString *)passcode ofType:(TOPasscodeType)type
  272. {
  273. [CCUtility setPasscode:passcode];
  274. [passcodeSettingsViewController dismissViewControllerAnimated:YES completion:nil];
  275. [self reloadForm];
  276. }
  277. - (void)didTapCancelInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  278. {
  279. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  280. }
  281. - (BOOL)passcodeViewController:(TOPasscodeViewController *)passcodeViewController isCorrectCode:(NSString *)code
  282. {
  283. if ([code isEqualToString:[CCUtility getPasscode]]) {
  284. [CCUtility setPasscode:@""];
  285. [self reloadForm];
  286. return YES;
  287. }
  288. return NO;
  289. }
  290. - (void)passcode:(XLFormRowDescriptor *)sender
  291. {
  292. LAContext *laContext = [LAContext new];
  293. NSError *error;
  294. [self deselectFormRow:sender];
  295. if ([[CCUtility getPasscode] length] == 0) {
  296. passcodeSettingsViewController = [[TOPasscodeSettingsViewController alloc] init];
  297. if (@available(iOS 13.0, *)) {
  298. if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
  299. passcodeSettingsViewController.style = TOPasscodeSettingsViewStyleDark;
  300. }
  301. }
  302. passcodeSettingsViewController.hideOptionsButton = YES;
  303. passcodeSettingsViewController.requireCurrentPasscode = NO;
  304. passcodeSettingsViewController.passcodeType = TOPasscodeTypeSixDigits;
  305. passcodeSettingsViewController.delegate = self;
  306. [self presentViewController:passcodeSettingsViewController animated:YES completion:nil];
  307. } else {
  308. passcodeViewController = [[TOPasscodeViewController alloc] initWithStyle:TOPasscodeViewStyleTranslucentLight passcodeType:TOPasscodeTypeSixDigits];
  309. if (@available(iOS 13.0, *)) {
  310. if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
  311. passcodeViewController.style = TOPasscodeViewStyleTranslucentDark;
  312. }
  313. }
  314. passcodeViewController.allowCancel = true;
  315. passcodeViewController.delegate = self;
  316. passcodeViewController.keypadButtonShowLettering = false;
  317. if (CCUtility.getEnableTouchFaceID && [laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
  318. if (error == NULL) {
  319. if (laContext.biometryType == LABiometryTypeFaceID) {
  320. passcodeViewController.biometryType = TOPasscodeBiometryTypeFaceID;
  321. passcodeViewController.allowBiometricValidation = true;
  322. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  323. } else if (laContext.biometryType == LABiometryTypeTouchID) {
  324. passcodeViewController.biometryType = TOPasscodeBiometryTypeTouchID;
  325. passcodeViewController.allowBiometricValidation = true;
  326. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  327. } else {
  328. NSLog(@"No Biometric support");
  329. }
  330. }
  331. }
  332. [self presentViewController:passcodeViewController animated:YES completion:nil];
  333. }
  334. }
  335. #pragma mark -
  336. - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
  337. {
  338. NSString *sectionName;
  339. switch (section)
  340. {
  341. case 1: {
  342. sectionName = NSLocalizedString(@"_lock_protection_no_screen_footer_", nil);
  343. }
  344. break;
  345. case 5: {
  346. NSString *versionServer = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionString];
  347. NSString *themingName = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingName];
  348. NSString *themingSlogan = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingSlogan];
  349. NSString *versionNextcloud = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudServer, versionServer];
  350. NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp];
  351. NSString *nameSlogan = [NSString stringWithFormat:@"%@ - %@", themingName, themingSlogan];
  352. sectionName = [NSString stringWithFormat:@"\n%@\n\n%@\n%@", versionNextcloudiOS, versionNextcloud, nameSlogan];
  353. }
  354. break;
  355. }
  356. return sectionName;
  357. }
  358. @end