diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 7caf12090..ab0c107df 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -10051,7 +10051,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.04.09; + version = 26.04.13; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5aa83fc5e..1d4d71108 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "12e465fcbc74ffd5e0b8c9c8f2c2c9c2bf36b48683874b4aefab01ffd87c5980", + "originHash" : "dad0d8e022a803126d1d3bd96acac1bf5e468fc5255c545f72595f09ad676aa5", "pins" : [ { "identity" : "compound-design-tokens", @@ -158,8 +158,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "aa73f6e49bdb5650739ba41ce566e81ee4815d4b", - "version" : "26.4.9" + "revision" : "4f9cf3fc5d2109361ca5abef6b41a8f653175d09", + "version" : "26.4.13" } }, { diff --git a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index 3722fddc2..8cc4f89e2 100644 --- a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -6,21 +6,6 @@ import Foundation -open class BackupSecretsSDKMock: MatrixRustSDK.BackupSecrets, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class CheckCodeSenderSDKMock: MatrixRustSDK.CheckCodeSender, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -8262,21 +8247,6 @@ open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendabl } } } -open class CrossSigningSecretsSDKMock: MatrixRustSDK.CrossSigningSecrets, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -11716,6 +11686,92 @@ open class LeaveSpaceHandleSDKMock: MatrixRustSDK.LeaveSpaceHandle, @unchecked S } } } +open class LiveLocationSharesSDKMock: MatrixRustSDK.LiveLocationShares, @unchecked Sendable { + public init() { + super.init(noHandle: .init()) + } + + public required init(unsafeFromHandle handle: UInt64) { + fatalError("init(unsafeFromHandle:) has not been implemented") + } + + fileprivate var handle: UInt64 { + get { return underlyingHandle } + set(value) { underlyingHandle = value } + } + fileprivate var underlyingHandle: UInt64! + + //MARK: - subscribe + + open var subscribeListenerUnderlyingCallsCount = 0 + open var subscribeListenerCallsCount: Int { + get { + if Thread.isMainThread { + return subscribeListenerUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = subscribeListenerUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + subscribeListenerUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + subscribeListenerUnderlyingCallsCount = newValue + } + } + } + } + open var subscribeListenerCalled: Bool { + return subscribeListenerCallsCount > 0 + } + open var subscribeListenerReceivedListener: LiveLocationShareListener? + open var subscribeListenerReceivedInvocations: [LiveLocationShareListener] = [] + + open var subscribeListenerUnderlyingReturnValue: TaskHandle! + open var subscribeListenerReturnValue: TaskHandle! { + get { + if Thread.isMainThread { + return subscribeListenerUnderlyingReturnValue + } else { + var returnValue: TaskHandle? = nil + DispatchQueue.main.sync { + returnValue = subscribeListenerUnderlyingReturnValue + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + subscribeListenerUnderlyingReturnValue = newValue + } else { + DispatchQueue.main.sync { + subscribeListenerUnderlyingReturnValue = newValue + } + } + } + } + open var subscribeListenerClosure: ((LiveLocationShareListener) -> TaskHandle)? + + open override func subscribe(listener: LiveLocationShareListener) -> TaskHandle { + subscribeListenerCallsCount += 1 + subscribeListenerReceivedListener = listener + DispatchQueue.main.async { + self.subscribeListenerReceivedInvocations.append(listener) + } + if let subscribeListenerClosure = subscribeListenerClosure { + return subscribeListenerClosure(listener) + } else { + return subscribeListenerReturnValue + } + } +} open class LoginWithQrCodeHandlerSDKMock: MatrixRustSDK.LoginWithQrCodeHandler, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -16263,6 +16319,71 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable { try await leaveClosure?() } + //MARK: - liveLocationShares + + open var liveLocationSharesUnderlyingCallsCount = 0 + open var liveLocationSharesCallsCount: Int { + get { + if Thread.isMainThread { + return liveLocationSharesUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = liveLocationSharesUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + liveLocationSharesUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + liveLocationSharesUnderlyingCallsCount = newValue + } + } + } + } + open var liveLocationSharesCalled: Bool { + return liveLocationSharesCallsCount > 0 + } + + open var liveLocationSharesUnderlyingReturnValue: LiveLocationShares! + open var liveLocationSharesReturnValue: LiveLocationShares! { + get { + if Thread.isMainThread { + return liveLocationSharesUnderlyingReturnValue + } else { + var returnValue: LiveLocationShares? = nil + DispatchQueue.main.sync { + returnValue = liveLocationSharesUnderlyingReturnValue + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + liveLocationSharesUnderlyingReturnValue = newValue + } else { + DispatchQueue.main.sync { + liveLocationSharesUnderlyingReturnValue = newValue + } + } + } + } + open var liveLocationSharesClosure: (() async -> LiveLocationShares)? + + open override func liveLocationShares() async -> LiveLocationShares { + liveLocationSharesCallsCount += 1 + if let liveLocationSharesClosure = liveLocationSharesClosure { + return await liveLocationSharesClosure() + } else { + return liveLocationSharesReturnValue + } + } + //MARK: - loadComposerDraft open var loadComposerDraftThreadRootThrowableError: Error? @@ -18803,77 +18924,6 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable { } } - //MARK: - subscribeToLiveLocationShares - - open var subscribeToLiveLocationSharesListenerUnderlyingCallsCount = 0 - open var subscribeToLiveLocationSharesListenerCallsCount: Int { - get { - if Thread.isMainThread { - return subscribeToLiveLocationSharesListenerUnderlyingCallsCount - } else { - var returnValue: Int? = nil - DispatchQueue.main.sync { - returnValue = subscribeToLiveLocationSharesListenerUnderlyingCallsCount - } - - return returnValue! - } - } - set { - if Thread.isMainThread { - subscribeToLiveLocationSharesListenerUnderlyingCallsCount = newValue - } else { - DispatchQueue.main.sync { - subscribeToLiveLocationSharesListenerUnderlyingCallsCount = newValue - } - } - } - } - open var subscribeToLiveLocationSharesListenerCalled: Bool { - return subscribeToLiveLocationSharesListenerCallsCount > 0 - } - open var subscribeToLiveLocationSharesListenerReceivedListener: LiveLocationShareListener? - open var subscribeToLiveLocationSharesListenerReceivedInvocations: [LiveLocationShareListener] = [] - - open var subscribeToLiveLocationSharesListenerUnderlyingReturnValue: TaskHandle! - open var subscribeToLiveLocationSharesListenerReturnValue: TaskHandle! { - get { - if Thread.isMainThread { - return subscribeToLiveLocationSharesListenerUnderlyingReturnValue - } else { - var returnValue: TaskHandle? = nil - DispatchQueue.main.sync { - returnValue = subscribeToLiveLocationSharesListenerUnderlyingReturnValue - } - - return returnValue! - } - } - set { - if Thread.isMainThread { - subscribeToLiveLocationSharesListenerUnderlyingReturnValue = newValue - } else { - DispatchQueue.main.sync { - subscribeToLiveLocationSharesListenerUnderlyingReturnValue = newValue - } - } - } - } - open var subscribeToLiveLocationSharesListenerClosure: ((LiveLocationShareListener) -> TaskHandle)? - - open override func subscribeToLiveLocationShares(listener: LiveLocationShareListener) -> TaskHandle { - subscribeToLiveLocationSharesListenerCallsCount += 1 - subscribeToLiveLocationSharesListenerReceivedListener = listener - DispatchQueue.main.async { - self.subscribeToLiveLocationSharesListenerReceivedInvocations.append(listener) - } - if let subscribeToLiveLocationSharesListenerClosure = subscribeToLiveLocationSharesListenerClosure { - return subscribeToLiveLocationSharesListenerClosure(listener) - } else { - return subscribeToLiveLocationSharesListenerReturnValue - } - } - //MARK: - subscribeToRoomInfoUpdates open var subscribeToRoomInfoUpdatesListenerUnderlyingCallsCount = 0 @@ -23124,21 +23174,6 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable { } } } -open class SecretsBundleSDKMock: MatrixRustSDK.SecretsBundle, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class SecretsBundleWithUserIdSDKMock: MatrixRustSDK.SecretsBundleWithUserId, @unchecked Sendable { public init() { super.init(noHandle: .init()) diff --git a/project.yml b/project.yml index d6802ee79..452c508fe 100644 --- a/project.yml +++ b/project.yml @@ -74,7 +74,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 26.04.09 + exactVersion: 26.04.13 # path: ../matrix-rust-sdk Compound: path: compound-ios