|
|
@ -433,11 +433,6 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (AnyPromise *)checkCanExportBackup
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return [self ensureCloudKitAccess];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (AnyPromise *)ensureCloudKitAccess
|
|
|
|
- (AnyPromise *)ensureCloudKitAccess
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
@ -473,6 +468,13 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
|
|
|
|
|
|
|
|
|
|
|
|
OWSLogInfo(@"");
|
|
|
|
OWSLogInfo(@"");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!OWSBackup.isFeatureEnabled) {
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
|
success(NO);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void (^failWithUnexpectedError)(void) = ^{
|
|
|
|
void (^failWithUnexpectedError)(void) = ^{
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
NSError *error =
|
|
|
|
NSError *error =
|
|
|
|