Enable Crypto SDK for production

This commit is contained in:
Andy Uhnak
2022-10-31 12:23:52 +00:00
parent f0159f42fe
commit c40a36a73d
9 changed files with 15 additions and 34 deletions
@@ -2184,9 +2184,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
[self clearCache];
// Reset Crypto SDK configuration (labs flag for which crypto module to use)
#if DEBUG
[CryptoSDKConfiguration.shared disable];
#endif
// Reset key backup banner preferences
[SecureBackupBannerPreferences.shared reset];
@@ -885,10 +885,12 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
return
}
let devices = mainSession.crypto.devices(forUser: mainSession.myUserId).values
let userHasOneUnverifiedDevice = devices.contains(where: {!$0.trustLevel.isCrossSigningVerified})
if userHasOneUnverifiedDevice {
presentReviewUnverifiedSessionsAlert(with: session)
if let userId = mainSession.myUserId, let crypto = mainSession.crypto {
let devices = crypto.devices(forUser: userId).values
let userHasOneUnverifiedDevice = devices.contains(where: {!$0.trustLevel.isCrossSigningVerified})
if userHasOneUnverifiedDevice {
presentReviewUnverifiedSessionsAlert(with: session)
}
}
}
@@ -588,12 +588,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
if (BuildSettings.settingsScreenShowLabSettings)
{
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
#if DEBUG
if (MXSDKOptions.sharedInstance.isCryptoSDKAvailable)
{
[sectionLabs addRowWithTag:LABS_ENABLE_CRYPTO_SDK];
}
#endif
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX];
@@ -2593,7 +2591,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
}
else
{
#if DEBUG
if (row == LABS_ENABLE_CRYPTO_SDK)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@@ -2606,7 +2603,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
cell = labelAndSwitchCell;
}
#endif
}
}
else if (section == SECTION_TAG_SECURITY)
@@ -3379,7 +3375,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
RiotSettings.shared.enableVoiceBroadcast = sender.isOn;
}
#if DEBUG
- (void)toggleEnableCryptoSDKFeature:(UISwitch *)sender
{
BOOL isEnabled = sender.isOn;
@@ -3407,7 +3402,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
[self presentViewController:confirmationAlert animated:YES completion:nil];
currentAlert = confirmationAlert;
}
#endif
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
{