Skip to content

Conversation

@laevandus
Copy link
Contributor

🔗 Issue Links

Fixes: IOS-1205

🎯 Goal

Compatibility changes for StreamCore based StreamChat

📝 Summary

🛠 Implementation

🎨 Showcase

🧪 Manual Testing Notes

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner November 4, 2025 11:53
@laevandus laevandus force-pushed the v5-stream-core branch 2 times, most recently from 36124e8 to 9055016 Compare November 4, 2025 12:03
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

1 Message
📖 There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by 🚫 Danger

@GetStream GetStream deleted a comment from Stream-SDK-Bot Nov 4, 2025
/// Returns the current value for the `StreamChat` instance.
private struct StreamChatProviderKey: InjectionKey {
static var currentValue: StreamChat?
nonisolated(unsafe) static var currentValue: StreamChat?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching to StreamCore's InjectedValues which does not use MainActor, therefore, this becomes needed again.

}

private func connectUser(withCredentials credentials: UserCredentials) {
chatClient.logout {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Race between logout and connect below. Internally we automatically logout on connect if needed. Therefore, it can be deleted.

@github-actions
Copy link

Public Interface

- @MainActor public protocol InjectionKey

- extension ChatThread: Identifiable  
- 
-   public var id: String

- extension String  
- 
-   public func levenshtein(_ other: String)-> Int

- @MainActor @propertyWrapper public struct Injected  
- 
-   public var wrappedValue: T
-   
- 
-   public init(_ keyPath: WritableKeyPath<InjectedValues, T>)

- extension MessageReactionType: Identifiable  
- 
-   public var id: String

- extension ChatMessageReaction: Identifiable  
- 
-   public var id: String

- @MainActor public struct InjectedValues  
- 
-   public static subscript<K>(key: K.Type)-> K.Value where K: InjectionKey
-   public static subscript<T>(_ keyPath: WritableKeyPath<InjectedValues, T>)-> T

 extension ViewFactory  
+   public func makeAttachmentTextView(options: AttachmentTextViewOptions)-> some View

 extension InjectedValues  
-   public var chatClient: ChatClient
+   @MainActor public var chatClient: ChatClient
-   public var colors: ColorPalette
+   @MainActor public var colors: ColorPalette
-   public var utils: Utils
+   @MainActor public var utils: Utils
-   public var images: Images
+   @MainActor public var images: Images
-   public var fonts: Fonts
+   @MainActor public var fonts: Fonts

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChatSwiftUI 9.63 MB 10.05 MB +433 KB 🟡

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MessageViewFactoryOptions.o +30293
AttachmentViewFactoryOptions.o +23947
ChannelViewFactoryOptions.o +22585
ImagePipeline.o -19954
SearchResultsView.o +19449
Show 259 more objects
Object Diff (bytes)
ComposerViewFactoryOptions.o +19028
TaskFetchOriginalData.o +14703
TaskFetchOriginalImageData.o -12163
ChatThreadListNavigatableItem.o +11652
L10n.o +11218
MessageContainerView.o +11211
FrameStore.o -10897
ChatChannelNavigatableListItem.o +9847
EmptyViewFactoryOptions.o +9752
ChatChannelList.o +9720
ChatThreadList.o +8869
ReactionsViewFactoryOptions.o +8851
TaskFetchDecodedImage.o -8667
MessageRepliesView.o +8579
ChatChannelSwipeableListItem.o +8445
DefaultViewFactory.o +8107
ImagePipeline+Cache.o +7995
ChatChannelHeaderViewModifier.o +7586
NukeImageLoader.o +7417
ThreadViewFactoryOptions.o +7080
ResumableData.o -6917
PinnedMessagesView.o +6819
ReactionsOverlayViewModel.o +6678
ReactionsOverlayView.o +6658
ChatChannelListItem.o +6485
LazyImage.o -6479
MessageComposerView.o +5924
GiphyAttachmentView.o +5891
ChatChannelListViewModel.o +5827
UIImage+SwiftyGif.o +5593
ImagePipelineError.o -5485
VideoAttachmentView.o +5462
ImageView.o -5419
TaskLoadImage.o +5202
MessageView.o +5112
ImageTask.o +5057
TaskFetchOriginalImage.o +5036
PhotoAssetsUtils.o +5029
ImageCache.o +4971
ChatThreadListItem.o +4900
ImagePipeline+Error.o +4831
ImagePipeline+Configuration.o +4593
QuotedMessageView.o +4512
MessageListView.o +4370
ImagePipelineConfiguration.o -4351
Log.o +4179
Animator.o -4052
ImageAttachmentView.o +3958
ReactionsOverlayContainer.o +3788
LazyImageState.o -3768
PollAttachmentView.o +3624
Image.o -3612
ImageRequest.o +3523
OperationTask.o -3473
VoiceRecordingContainerView.o +3376
ImagePipelineCache.o -3364
ChatChannelExtensions.o +3315
LinkAttachmentView.o +3315
DataLoader.o +3187
ChatChannelView.o +3096
CreatePollView.o +3079
MessageComposerViewModel.o +2866
MessageListHelperViews.o +2806
ChatMessage+Extensions.o -2776
ComposerHelperViews.o +2760
AsyncPipelineTask.o +2669
DependencyInjection.o -2480
ImagePipelineTask.o -2437
UIImageView+SwiftyGif.o +2422
GalleryView.o +2415
MediaAttachmentsView.o +2365
FileAttachmentView.o +2339
StreamLazyImage.o +2331
MessageBubble.o +2158
ImageRequestKeys.o -2037
GIFImageView.o -2021
Graphics.o +1895
ChatChannelInfoView.o +1868
PollCommentsView.o +1837
AnimatedImageView.o -1832
NukeVideoPlayerView.o -1809
DateUtils.o -1797
StringExtensions.o -1655
AddUsersView.o +1643
ReactionsView.o -1623
ChannelHeaderLoader.o +1563
AsyncTask.o -1533
AlertBannerViewModifier.o +1480
LazyImageExtensions.o -1412
ZoomableScrollView.o +1399
PollResultsView.o +1370
VideoPreviewLoader.o +1329
MentionsCommandHandler.o +1287
PhotoAttachmentPickerView.o +1284
TaskLoadData.o -1265
MessageActionsViewModel.o +1252
ChatChannelListView.o +1222
LinkTextView.o +1199
TrailingComposerView.o +1189
MoreChannelActionsView.o +1161
ReactionsHelperViews.o +1158
ImageProcessingOptions.o +1152
BouncedMessageActionsModifier.o +1074
AttachmentPickerTypeView.o +1051
WaveformView.o +1006
ComposerModels.o -1004
PollAllOptionsView.o +967
ImageProcessors+Resize.o -964
BottomReactionsView.o +964
LazyImageView.o +944
AddUsersViewModel.o -939
ImagePipeline+Delegate.o +934
ReactionUserView.o +931
ImageProcessing.o -926
ImagePipelineDelegate.o -922
DelayedRenderingViewModifier.o -887
MediaAttachmentsViewModel.o +870
ComposerTextInputView.o +867
Atomic.o +823
MessageActionsView.o +819
MessageTranslationFooterView.o -809
AttachmentPickerView.o +807
AddedImageAttachmentsView.o +806
SwiftyGifManager.o +795
Deprecated.o -789
SwiftUI+UIAlertController.o +782
ReactionsBubbleView.o +772
ChannelAvatarsMerger.o -753
Images.o +748
DataCache.o +730
LoadingView.o +708
MessageViewModel.o -704
ChatChannelHelpers.o +675
PollCommentsViewModel.o -666
SearchBar.o +650
ReactionsUsersView.o -643
AnimatedFrame.o -615
DefaultChannelActions.o +598
PollOptionAllVotesViewModel.o -587
ColorPalette.o +579
MessageComposerViewModel+Recording.o +573
GridMediaView.o +562
MessageListConfig.o +556
RecordingView.o +544
DiscardAttachmentButton.o +544
AssetType.o +542
FilePickerView.o +531
MarkdownFormatter.o -521
WebView.o +519
ImageResponse.o -512
AutoLayoutHelpers.o +495
ChatChannelInfoHelperViews.o +491
InputTextView.o +481
ChatThreadListView.o +479
AudioVisualizationView.o +479
MessageAvatarView.o -468
VideoPlayerView.o +456
ActionItemView.o -449
MoreChannelActionsFullScreenWrappingView.o +433
ImagePublisher.o -432
NSLayoutConstraint+Extensions.o +430
SlowModeView.o -428
AudioRecordingNameFormatter.o -408
ImageDecoderRegistry.o -400
PollsHelpers.o -394
MessagePreviewFormatter.o -394
NoContentView.o -386
FileAttachmentsViewModel.o +385
LockedView.o +377
GIFAnimatable.o -372
ChatThreadListLoadingView.o +370
MessageThreadHeaderViewModifier.o -367
TitleWithCloseButton.o +361
ChatThreadListHeaderView.o -358
RecordingTipView.o -356
ShareButtonView.o +352
TypingIndicatorView.o +344
ImageSourceHelpers.o -333
PollOptionAllVotesView.o +331
ReactionsUsersViewModel.o -324
SystemMessageView.o -324
AttachmentDownloadingStateView.o +319
ChatChannelNamer.o -318
MessageRelativeDateFormatter.o +318
ParticipantInfoView.o -316
ChatInfoParticipantsView.o +313
ImagePrefetcher.o +309
AttachmentUploadingStateView.o +309
ImageContainer.o -301
ImageEncoders+ImageIO.o +290
StreamCore_-14BA7DE23376E301_PackageProduct +284
ImageEncoders+Default.o +284
CreatePollViewModel.o -278
GalleryHeaderView.o -268
PollAttachmentViewModel.o -265
JumpToUnreadButton.o +258
DefaultMessageActions.o +258
ChatChannelInfoViewModel.o -252
MoreChannelActionsViewModel.o -251
AudioSessionFeedbackGenerator.o +237
ImageCDN.o -232
MessageActionsResolver.o +215
NukeImageProcessor.o +207
GiphyBadgeView.o -203
TaskFetchWithPublisher.o +198
ChatChannelDataSource.o +198
ReactionsIconProvider.o -190
ChatChannelListHeader.o -190
ViewModelsFactory.o +186
ActionBannerView.o +181
PercentageProgressView.o -177
ChatThreadListHeaderViewModifier.o -169
Shimmer.o +168
HideTabBarModifier.o +167
ChatThreadListViewModel.o -167
FileAttachmentsView.o +162
StreamChat_-14BA7DE24FFA260A_PackageProduct -156
ChatThreadListFooterView.o +153
ChatChannelViewModel.o +152
OnLoadViewModifier.o +151
FloatingBannerViewModifier.o +147
Internal.o -145
MentionUsersView.o -143
KeyboardHandling.o +137
Modifiers.o -132
ImageEncoding.o -131
ImagePickerView.o +130
CommandsContainerView.o +126
NoChannelsView.o -122
SnapshotCreator.o +120
DiscardButtonView.o +114
SendMessageButton.o +114
FileAttachmentPreview.o +110
UIImageView.o -108
GiphyCommandHandler.o -100
DeletedMessageView.o -99
ImageCaching.o +96
ImageProcessors+Composition.o -95
ImageDecoders+Default.o -86
ViewExtensions.o +86
InstantCommandsView.o +80
DataPublisher.o +78
AddedFileAttachmentsView.o +77
AVDataAsset.o -75
ChatChannelHelperViews.o -71
ChannelControllerFactory.o -68
NavigationContainerView.o +68
ImageViewExtensions.o +68
RecordingDurationView.o -64
MessageListDateUtils.o -60
NoThreadsView.o -60
ChatChannelListScreen.o -56
NavigationBarThemeViewModifier.o +55
ImageProcessors.o -52
ImageDecompression.o -50
Foundation.tbd -48
CommandsConfig.o -44
FetchImage.o -44
NukeCache.o +43

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants