mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Update the SDK, minor version, handle API breaks (#1994)
This commit is contained in:
@@ -6247,7 +6247,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||||
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)";
|
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 13.3;
|
MACOSX_DEPLOYMENT_TARGET = 13.3;
|
||||||
MARKETING_VERSION = 1.3.4;
|
MARKETING_VERSION = 1.4.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -6322,7 +6322,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||||
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)";
|
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 13.3;
|
MACOSX_DEPLOYMENT_TARGET = 13.3;
|
||||||
MARKETING_VERSION = 1.3.4;
|
MARKETING_VERSION = 1.4.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
@@ -6596,7 +6596,7 @@
|
|||||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = "0.0.1-october23";
|
version = "0.0.2-october23";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||||
|
|||||||
@@ -129,8 +129,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "f53f5302ddcd81e4134fa7437fedd5c33cd7c1bf",
|
"revision" : "48f7062bd94debe766820a28c77f40a6e51900c3",
|
||||||
"version" : "0.0.1-october23"
|
"version" : "0.0.2-october23"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
{
|
{
|
||||||
"identity" : "swiftui-introspect",
|
"identity" : "swiftui-introspect",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
|
"location" : "https://github.com/siteline/SwiftUI-Introspect",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
||||||
"version" : "0.9.2"
|
"version" : "0.9.2"
|
||||||
|
|||||||
@@ -2697,17 +2697,22 @@ class SecureBackupControllerMock: SecureBackupControllerProtocol {
|
|||||||
return isLastSessionReturnValue
|
return isLastSessionReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MARK: - waitForKeyBackup
|
//MARK: - waitForKeyBackupUpload
|
||||||
|
|
||||||
var waitForKeyBackupCallsCount = 0
|
var waitForKeyBackupUploadCallsCount = 0
|
||||||
var waitForKeyBackupCalled: Bool {
|
var waitForKeyBackupUploadCalled: Bool {
|
||||||
return waitForKeyBackupCallsCount > 0
|
return waitForKeyBackupUploadCallsCount > 0
|
||||||
}
|
}
|
||||||
var waitForKeyBackupClosure: (() async -> Void)?
|
var waitForKeyBackupUploadReturnValue: Result<Void, SecureBackupControllerError>!
|
||||||
|
var waitForKeyBackupUploadClosure: (() async -> Result<Void, SecureBackupControllerError>)?
|
||||||
|
|
||||||
func waitForKeyBackup() async {
|
func waitForKeyBackupUpload() async -> Result<Void, SecureBackupControllerError> {
|
||||||
waitForKeyBackupCallsCount += 1
|
waitForKeyBackupUploadCallsCount += 1
|
||||||
await waitForKeyBackupClosure?()
|
if let waitForKeyBackupUploadClosure = waitForKeyBackupUploadClosure {
|
||||||
|
return await waitForKeyBackupUploadClosure()
|
||||||
|
} else {
|
||||||
|
return waitForKeyBackupUploadReturnValue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol {
|
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol {
|
||||||
|
|||||||
+9
@@ -30,6 +30,15 @@ enum SecureBackupLogoutConfirmationScreenViewMode {
|
|||||||
|
|
||||||
struct SecureBackupLogoutConfirmationScreenViewState: BindableState {
|
struct SecureBackupLogoutConfirmationScreenViewState: BindableState {
|
||||||
var mode: SecureBackupLogoutConfirmationScreenViewMode
|
var mode: SecureBackupLogoutConfirmationScreenViewMode
|
||||||
|
var bindings = SecureBackupLogoutConfirmationScreenBindings()
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SecureBackupLogoutConfirmationScreenBindings {
|
||||||
|
var alertInfo: AlertInfo<SecureBackupLogoutConfirmationScreenAlertType>?
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SecureBackupLogoutConfirmationScreenAlertType {
|
||||||
|
case backupUploadFailed
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SecureBackupLogoutConfirmationScreenViewAction {
|
enum SecureBackupLogoutConfirmationScreenViewAction {
|
||||||
|
|||||||
+12
-1
@@ -77,7 +77,18 @@ class SecureBackupLogoutConfirmationScreenViewModel: SecureBackupLogoutConfirmat
|
|||||||
state.mode = networkMonitor.reachabilityPublisher.value == .reachable ? .backupOngoing : .offline
|
state.mode = networkMonitor.reachabilityPublisher.value == .reachable ? .backupOngoing : .offline
|
||||||
|
|
||||||
keyUploadWaitingTask = Task {
|
keyUploadWaitingTask = Task {
|
||||||
await secureBackupController.waitForKeyBackup()
|
var result = await secureBackupController.waitForKeyBackupUpload()
|
||||||
|
|
||||||
|
if case .failure = result {
|
||||||
|
// Retry the upload first, conditions might have changed.
|
||||||
|
result = await secureBackupController.waitForKeyBackupUpload()
|
||||||
|
}
|
||||||
|
|
||||||
|
guard case .success = result else {
|
||||||
|
MXLog.error("Aborting logout due to failure waiting for backup upload.")
|
||||||
|
state.bindings.alertInfo = .init(id: .backupUploadFailed)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
guard !Task.isCancelled else { return }
|
guard !Task.isCancelled else { return }
|
||||||
|
|
||||||
|
|||||||
+1
@@ -33,6 +33,7 @@ struct SecureBackupLogoutConfirmationScreen: View {
|
|||||||
.toolbar { toolbar }
|
.toolbar { toolbar }
|
||||||
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
||||||
.safeAreaInset(edge: .bottom) { footer.padding() }
|
.safeAreaInset(edge: .bottom) { footer.padding() }
|
||||||
|
.alert(item: $context.alertInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,8 +122,23 @@ class SecureBackupController: SecureBackupControllerProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func waitForKeyBackup() async {
|
func waitForKeyBackupUpload() async -> Result<Void, SecureBackupControllerError> {
|
||||||
await encryption.waitForBackupUploadSteadyState(progressListener: nil)
|
do {
|
||||||
|
try await encryption.waitForBackupUploadSteadyState(progressListener: nil)
|
||||||
|
return .success(())
|
||||||
|
} catch let error as SteadyStateError {
|
||||||
|
switch error {
|
||||||
|
case .BackupDisabled:
|
||||||
|
MXLog.error("Key backup disabled, continuing logout.")
|
||||||
|
return .success(())
|
||||||
|
case .Connection, .Laged:
|
||||||
|
MXLog.error("Key backup upload failure: \(error)")
|
||||||
|
return .failure(.failedUploadingForBackup)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
MXLog.error("Unknown key backup upload failure")
|
||||||
|
return .failure(.failedUploadingForBackup)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ enum SecureBackupControllerError: Error {
|
|||||||
case failedConfirmingRecoveryKey
|
case failedConfirmingRecoveryKey
|
||||||
|
|
||||||
case failedFetchingSessionState
|
case failedFetchingSessionState
|
||||||
|
|
||||||
|
case failedUploadingForBackup
|
||||||
}
|
}
|
||||||
|
|
||||||
// sourcery: AutoMockable
|
// sourcery: AutoMockable
|
||||||
@@ -61,7 +63,7 @@ protocol SecureBackupControllerProtocol {
|
|||||||
|
|
||||||
func isLastSession() async -> Result<Bool, SecureBackupControllerError>
|
func isLastSession() async -> Result<Bool, SecureBackupControllerError>
|
||||||
|
|
||||||
func waitForKeyBackup() async
|
func waitForKeyBackupUpload() async -> Result<Void, SecureBackupControllerError>
|
||||||
}
|
}
|
||||||
|
|
||||||
extension SecureBackupControllerMock {
|
extension SecureBackupControllerMock {
|
||||||
|
|||||||
+2
-2
@@ -29,7 +29,7 @@ settings:
|
|||||||
APP_NAME: ElementX
|
APP_NAME: ElementX
|
||||||
APP_DISPLAY_NAME: Element X
|
APP_DISPLAY_NAME: Element X
|
||||||
KEYCHAIN_ACCESS_GROUP_IDENTIFIER: $(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)
|
KEYCHAIN_ACCESS_GROUP_IDENTIFIER: $(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)
|
||||||
MARKETING_VERSION: 1.3.4
|
MARKETING_VERSION: 1.4.0
|
||||||
CURRENT_PROJECT_VERSION: 1
|
CURRENT_PROJECT_VERSION: 1
|
||||||
DEVELOPMENT_TEAM: 7J4U792NQT
|
DEVELOPMENT_TEAM: 7J4U792NQT
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||||
exactVersion: 0.0.1-october23
|
exactVersion: 0.0.2-october23
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/vector-im/compound-ios
|
url: https://github.com/vector-im/compound-ios
|
||||||
|
|||||||
Reference in New Issue
Block a user