diff --git a/Package.swift b/Package.swift index 0d9eeb2cd..fce73588e 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.70.0"), + .package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.71.0"), ], targets: [ .target( diff --git a/StreamChatSwiftUI-XCFramework.podspec b/StreamChatSwiftUI-XCFramework.podspec index ae33a69e5..3dcbb7a97 100644 --- a/StreamChatSwiftUI-XCFramework.podspec +++ b/StreamChatSwiftUI-XCFramework.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |spec| spec.framework = 'Foundation', 'UIKit', 'SwiftUI' - spec.dependency 'StreamChat-XCFramework', '~> 4.70.0' + spec.dependency 'StreamChat-XCFramework', '~> 4.71.0' spec.cocoapods_version = '>= 1.11.0' end diff --git a/StreamChatSwiftUI.podspec b/StreamChatSwiftUI.podspec index 173ed70e4..c7ef0a92a 100644 --- a/StreamChatSwiftUI.podspec +++ b/StreamChatSwiftUI.podspec @@ -19,5 +19,5 @@ Pod::Spec.new do |spec| spec.framework = 'Foundation', 'UIKit', 'SwiftUI' - spec.dependency 'StreamChat', '~> 4.70.0' + spec.dependency 'StreamChat', '~> 4.71.0' end diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index d2220212d..12f85d9bb 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -3844,7 +3844,7 @@ repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 4.70.0; + minimumVersion = 4.71.0; }; }; E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { diff --git a/StreamChatSwiftUITests/Infrastructure/TestTools/ChatClient_Mock.swift b/StreamChatSwiftUITests/Infrastructure/TestTools/ChatClient_Mock.swift index e2abc1405..29d83fb4a 100644 --- a/StreamChatSwiftUITests/Infrastructure/TestTools/ChatClient_Mock.swift +++ b/StreamChatSwiftUITests/Infrastructure/TestTools/ChatClient_Mock.swift @@ -34,12 +34,8 @@ public extension ChatClient { databaseContainerBuilder: { DatabaseContainer_Spy( kind: $0, - shouldFlushOnStart: $1, - shouldResetEphemeralValuesOnStart: $2, bundle: Bundle(for: StreamChatTestCase.self), - localCachingSettings: $3, - deletedMessagesVisibility: $4, - shouldShowShadowedMessages: $5 + chatClientConfig: $1 ) }, authenticationRepositoryBuilder: AuthenticationRepository_Mock.init diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListViewModel_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListViewModel_Tests.swift index aa01fa099..074dd4934 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListViewModel_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListViewModel_Tests.swift @@ -338,7 +338,7 @@ class ChatChannelListViewModel_Tests: StreamChatTestCase { } func test_loadAdditionalSearchResults_whenSearchTypeIsMessages_shouldLoadNextMessages() { - let messageSearchController = ChatMessageSearchController_Mock.mock() + let messageSearchController = ChatMessageSearchController_Mock.mock(client: .mock(isLocalStorageEnabled: false)) let viewModel = makeDefaultChannelListVM(searchType: .messages) viewModel.messageSearchController = messageSearchController diff --git a/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListViewModel_Tests.swift b/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListViewModel_Tests.swift index 993414da0..ed8d33e47 100644 --- a/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListViewModel_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListViewModel_Tests.swift @@ -11,7 +11,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_viewDidAppear_thenLoadsThreads() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) let viewModel = ChatThreadListViewModel( threadListController: mockThreadListController @@ -23,7 +24,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_viewDidAppear_whenAlreadyLoadedThreads_thenDoesNotLoadsThreads() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) let viewModel = ChatThreadListViewModel( threadListController: mockThreadListController @@ -38,7 +40,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_loadThreads_whenInitialEmptyData_whenSuccess() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) mockThreadListController.threads_mock = [] let viewModel = ChatThreadListViewModel( @@ -64,7 +67,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_loadThreads_whenCacheAvailable_whenSuccess() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) mockThreadListController.threads_mock = [.mock()] let viewModel = ChatThreadListViewModel( @@ -90,7 +94,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_loadThreads_whenError() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) mockThreadListController.threads_mock = [] let viewModel = ChatThreadListViewModel( @@ -110,7 +115,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_didAppearThread_whenInsideThreshold_thenLoadMoreThreads() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) let viewModel = ChatThreadListViewModel( threadListController: mockThreadListController @@ -131,7 +137,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_didAppearThread_whenNotInThreshold_thenDoNotLoadMoreThreads() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) let viewModel = ChatThreadListViewModel( threadListController: mockThreadListController @@ -152,7 +159,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase { func test_didReceiveThreadMessageNewEvent() { let mockThreadListController = ChatThreadListController_Mock.mock( - query: .init(watch: true) + query: .init(watch: true), + client: .mock(isLocalStorageEnabled: false) ) let viewModel = ChatThreadListViewModel( threadListController: mockThreadListController