Merge branch 'charlesmchen/incrementalBackup6'

pull/1/head
Matthew Chen 7 years ago
commit c5a48edf5a

@ -7,6 +7,7 @@
#import "AdvancedSettingsTableViewController.h" #import "AdvancedSettingsTableViewController.h"
#import "DebugUITableViewController.h" #import "DebugUITableViewController.h"
#import "NotificationSettingsViewController.h" #import "NotificationSettingsViewController.h"
#import "OWSBackup.h"
#import "OWSBackupSettingsViewController.h" #import "OWSBackupSettingsViewController.h"
#import "OWSLinkedDevicesTableViewController.h" #import "OWSLinkedDevicesTableViewController.h"
#import "OWSNavigationController.h" #import "OWSNavigationController.h"
@ -188,13 +189,26 @@
actionBlock:^{ actionBlock:^{
[weakSelf showAdvanced]; [weakSelf showAdvanced];
}]]; }]];
// Show backup UI in debug builds OR if backup has already been enabled.
//
// NOTE: Backup format is not yet finalized and backups are not yet
// properly encrypted, so these debug backups should only be
// done on test devices and will not be usable if/when we ship
// backup to production.
//
// TODO: Always show backup when we go to production.
BOOL isBackupEnabled = [OWSBackup.sharedManager isBackupEnabled];
BOOL showBackup = isBackupEnabled;
#ifdef DEBUG #ifdef DEBUG
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_BACKUP", showBackup = YES;
@"Label for the backup view in app settings.")
actionBlock:^{
[weakSelf showBackup];
}]];
#endif #endif
if (showBackup) {
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_BACKUP",
@"Label for the backup view in app settings.")
actionBlock:^{
[weakSelf showBackup];
}]];
}
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_ABOUT", @"") [section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_ABOUT", @"")
actionBlock:^{ actionBlock:^{
[weakSelf showAbout]; [weakSelf showAbout];

@ -10,6 +10,8 @@ import CloudKit
// If we change the record types, we need to ensure indices // If we change the record types, we need to ensure indices
// are configured properly in the CloudKit dashboard. // are configured properly in the CloudKit dashboard.
//
// TODO: Change the record types when we ship to production.
static let signalBackupRecordType = "signalBackup" static let signalBackupRecordType = "signalBackup"
static let manifestRecordName = "manifest" static let manifestRecordName = "manifest"
static let payloadKey = "payload" static let payloadKey = "payload"

Loading…
Cancel
Save