From 196cb55431d5b3d24802ab543d3b738a4b83b640 Mon Sep 17 00:00:00 2001 From: Martin Mitrevski Date: Thu, 27 Jun 2024 14:14:27 +0200 Subject: [PATCH] Updated StreamChat dependency (#526) --- Package.swift | 2 +- Sources/StreamChatSwiftUI/StreamChat.swift | 1 + StreamChatSwiftUI-XCFramework.podspec | 2 +- StreamChatSwiftUI.podspec | 2 +- StreamChatSwiftUI.xcodeproj/project.pbxproj | 2 +- .../Tests/ChatChannel/ReactionsOverlayView_Tests.swift | 1 + .../Tests/ChatChannel/ReactionsUsersView_Tests.swift | 2 ++ .../Tests/Base TestCase/StreamTestCase.swift | 2 +- 8 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 105e3279..7b14beb9 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.57.0"), + .package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.58.0"), ], targets: [ .target( diff --git a/Sources/StreamChatSwiftUI/StreamChat.swift b/Sources/StreamChatSwiftUI/StreamChat.swift index 2464fd80..a33ee6da 100644 --- a/Sources/StreamChatSwiftUI/StreamChat.swift +++ b/Sources/StreamChatSwiftUI/StreamChat.swift @@ -17,6 +17,7 @@ public class StreamChat { appearance: Appearance = Appearance(), utils: Utils = Utils() ) { + StreamRuntimeCheck._isDatabaseObserverItemReusingEnabled = false self.chatClient = chatClient self.appearance = appearance self.utils = utils diff --git a/StreamChatSwiftUI-XCFramework.podspec b/StreamChatSwiftUI-XCFramework.podspec index 1a34bc4e..81c743a4 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.57.0' + spec.dependency 'StreamChat-XCFramework', '~> 4.58.0' spec.cocoapods_version = '>= 1.11.0' end diff --git a/StreamChatSwiftUI.podspec b/StreamChatSwiftUI.podspec index 7f73522a..8eb72736 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.57.0' + spec.dependency 'StreamChat', '~> 4.58.0' end diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index 30879627..84630447 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -3705,7 +3705,7 @@ repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 4.57.0; + minimumVersion = 4.58.0; }; }; E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift index 59e34486..3deee31a 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift @@ -72,6 +72,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { // Given let author = ChatUser.mock(id: .unique, name: "Martin") let reaction = ChatMessageReaction( + id: .unique, type: .init(rawValue: "love"), score: 1, createdAt: Date(), diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift index f7a65d1a..c900f202 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift @@ -15,6 +15,7 @@ class ReactionsUsersView_Tests: StreamChatTestCase { // Given let author = ChatUser.mock(id: .unique, name: "Martin") let reaction = ChatMessageReaction( + id: .unique, type: .init(rawValue: "love"), score: 1, createdAt: Date(), @@ -44,6 +45,7 @@ class ReactionsUsersView_Tests: StreamChatTestCase { for _ in 0..<8 { let author = ChatUser.mock(id: .unique, name: "Martin") let reaction = ChatMessageReaction( + id: .unique, type: .init(rawValue: "love"), score: 1, createdAt: Date(), diff --git a/StreamChatSwiftUITestsAppTests/Tests/Base TestCase/StreamTestCase.swift b/StreamChatSwiftUITestsAppTests/Tests/Base TestCase/StreamTestCase.swift index 38ced9e3..8600fba2 100644 --- a/StreamChatSwiftUITestsAppTests/Tests/Base TestCase/StreamTestCase.swift +++ b/StreamChatSwiftUITestsAppTests/Tests/Base TestCase/StreamTestCase.swift @@ -90,7 +90,7 @@ extension StreamTestCase { return } server.stop() - MockServerConfiguration.port = Int.random(in: 61000..<62000) + MockServerConfiguration.port = UInt16(Int.random(in: 61000..<62000)) } mockServerCrashed = true