Releases: GetStream/stream-chat-swift
Releases · GetStream/stream-chat-swift
2.1.0
⚠️ Breaking Changes
- Set user will return a
Result<UserConnection, ClientError>
in callback.UserConnection
has the current user data, connection id and unread count for channels and messages #182. AvatarView.init
changed and it requiresAvatarViewStyle
intead ofcornerRadius
andfont
#203.- Renamed #100:
ChannelPresenter.uploader
toChannelPresenter.uploadManager
,UploadItem
toUploadingItem
.
- Modified signatures #100:
func sendImage(data: Data,
fileName: String,
mimeType: String,
channel: Channel,
progress: @escaping Client.Progress,
completion: @escaping Client.Completion<URL>) -> Cancellable
func sendFile(data: Data,
fileName: String,
mimeType: String,
channel: Channel,
progress: @escaping Client.Progress,
completion: @escaping Client.Completion<URL>) -> Cancellable
func deleteImage(url: URL, channel: Channel, _ completion: @escaping Client.Completion<EmptyData> = { _ in }) -> Cancellable
func deleteFile(url: URL, channel: Channel, _ completion: @escaping Client.Completion<EmptyData> = { _ in }) -> Cancellable
🔄 Changed
Pagination
doesn't support+
operator anymore, please use a set ofPaginationOption
s from now on #158.channel.subscribeToWatcherCount
uses channel events to publish updated counts and does not callchannel.watch
as a side-effect anymore #161.- Subscriptions for a channel unread count and watcher count #172.
- Changed a returning type for requests as
Cancellable
instead ofURLSessionTask
to make requests and events more consistent #172. - The example project was updated #172.
- Rename
showImagePickerAuthorizationStatusAlert
toshowImagePickerAlert
#215
✅ Added
- Message preparation callback on
ChannelPresenter
to modify messages before they're sent #142. - The view controller for threads can now be customized by overriding
createThreadViewController
inChatViewController
. This is useful if you need a different style for threads. #136. - Better errors when developers forget to call
set(user:)
or don't wait for its completion #160. - Examples for a channel unread count and watcher count in the Example app #172.
- Added
ChatViewStyle.default
#191. - Added
ChatViewStyle.dynamic
for iOS 13 to support dynamic colors for dark mode #191. - Added
MessageViewStyle.pointedCornerRadius
to make pointed corner rounded #191. - Added methods for
AvatarView
customization #203: - Added
messageInsetSpacing
toMessageViewStyle
to allow control of spacing between message and container #216. - Added
Uploader
protocol. Use them to create own uploader for your file storage. Assign your uploader intoChannelPresenter
#100:
presenter.uploadManager = UploadManager(uploader: customUploader)
ChannelsViewController
:
open func updateChannelCellAvatarView(in cell: ChannelTableViewCell, channel: Channel)
ChatViewController
:
open func updateMessageCellAvatarView(in cell: MessageTableViewCell, message: Message, messageStyle: MessageViewStyle)
open func updateFooterTypingUserAvatarView(footerView: ChatFooterView, user: User)
- New properties for
AvatarViewStyle
#203:placeholderTextColor: UIColor?
placeholderBackgroundColor: UIColor?
- Added
Uploader
protocol. Use them to create own uploader for your file storage. Assign your uploader intoChannelPresenter
#100:
presenter.uploadManager = UploadManager(uploader: customUploader)
🐞 Fixed
- SPM support #156.
- Made
SubscriptionBag.init
public #172. - Unused
RxBlocking
dependency removed #177. - Reconnection now automatically re-watches all channels watched up to that point #178.
- Unnecessary
Gzip
dependency removed #183. - Unnecessary
Reachability
dependency removed #184. - Flag message/user #186.
- Discard messages from muted users #186.
- Fix composerView hiding behind keyboard after launching from bg #188.
- Open
prepareForReuse()
inChannelTableViewCell
andMessageTableViewCell
#190. - Channel query options default to
.state
, in-line with documentation instead of empty #198 - Fix the deprecation warning in the
UI
framework #201. - Fix current user's messages are counted towards unread count #206
- Fix ImagePicker not asking for permission for avaible source types #215
- Fix ImagePicker showing an error when no image is selected #215
2.0.0
StreamChat 2.0 here and it's brand new ✨ 🚀
We've added/removed/fixed/changed a lot of stuff, so it's fair to say that StreamChat 2.0 is everything you've liked about 1.x and nothing you didn't like about it 😄
Most importantly:
- We have a brand new framework:
StreamChatClient
, that you can use to easily integrate StreamChat into your app without any Presenter or UI logic we have inStreamChatCore
andStreamChat
libraries.StreamChatClient
has minimal dependencies and it's very low level.- No Reactive dependencies! Everything is handled in good old callbacks.
- No reactive makes you sad? StreamChatCore still has all the reactive functionality you'd expect, so you can keep using RxSwift if you want!
- We've updated our dependencies, and removed some.
Aside from those, we fixed tons of bugs and polished our API. Now it should be more Swifty 🎉
We're working hard on migration guide for our 1.x users and will publish it shortly.
You can check out updated docs here
1.6.2
1.6.1
1.6.0
⚠️ Breaking Changes
- Removed hard-coded reactions. #113
- Reaction API changed: addReaction requires a reaction object instance of reaction type. #113
✅ Added
- Custom reactions. #113
- A new cumulative reaction type (like claps in Medium). #113
- Custom fields for reactions. #113
- Message actions with a context menu from iOS 13. #115
🐞 Fixed
- Error description of failed request is now human-readable #104
1.5.7
1.5.6
🔄 Changed
- Failed uploads now retry up to 3 times #85
✅ Added
- Swift Package Manager (SPM) support #38
ViewController.showAlert(title:message:actions:)
now you can override this function to decide when/how alerts should be handled #85- Allow user to go directly to iOS settings if they've disabled photo library access and trying to upload image/video #85
🐞 Fixed
1.5.5
🔄 Changed
- Handling keyboard notifications for ChatViewController in rx, robust way.
✅ Added
- Banner animation without bouncing.
- Customization for message actions.
- Added
Event.reactionUpdated
. - Opened
MessageTableViewCell
. - Opened
ChannelTableViewCell
. - More customization for a message and channel cells.
- Added
AvatarViewStyle
- Added
SeparatorStyle
- Added
Spacing
- Added
ChannelTableViewCell.VerticalTextAlignment
MessageTableViewCell.avatarViewStyle: AvatarViewStyle?
MessageTableViewCell.spacing: Spacing
MessageTableViewCell.edgeInsets: UIEdgeInsets
ChannelTableViewCell.avatarViewStyle: AvatarViewStyle?
ChannelTableViewCell.separatorStyle: SeparatorStyle
ChannelTableViewCell.nameNumberOfLines: Int
ChannelTableViewCell.messageNumberOfLines: Int
ChannelTableViewCell.height: CGFloat
ChannelTableViewCell.spacing: Spacing
ChannelTableViewCell.edgeInsets: UIEdgeInsets
ChannelTableViewCell.verticalTextAlignment: VerticalTextAlignment
- Added
- Added a customization for message actions.
🐞 Fixed
- Fixed example app memory leak.
- Fixed keyboard events replaying unexpectedly.
- Scroll the table view to the bottom safely.
- Fixed a crash when the token was expired.
- Fixed
StatusTableViewCell
layout. - Fixed video attachments are not recognized and not clickable. #56
- Fixed ComposerView going behind keyboard when an opaque TabBar is used. #64
- Fixed WebView crashing when file picker is presented in a website in iPhones. #69
- Fixed messages not being grouped correctly after one day. #72
1.5.4
💥 Breaking Changes
- The order of parameters in
Message.init
- Removed members from
ChannelResponse
. Now it's only inside the channel of the response.
🔄 Changed
- Improved Token validation.
✅ Added
- Public
Attachment.init(...)
. - Public
Reaction.init(...)
. - Public
Reaction(counts: [ReactionType: Int])
. - Public
User.unknown
. - Example app with Cocoapods.
- Example app with Carthage.
- A new authorization in the Example app.
✈️ Offline mode insideInternetConnection
.- Improved connection flow.
- Extension
Data.hex
. - Extension
String.md5
,String.url?
. Filter.description
.Sorting.description
.- A variable
JSONDecoder.default
. Now you can change the default JSON decoder. - Variables
JSONEncoder.default
andJSONEncoder.defaultGzip
. Now you can change default JSON encoders. - A channel for a direct messages will use a member avatar as default channel image by default.
- Docs for the
ClientLogger
. - Hide a channel with clearing messages history.
- Added a new event
Event.channelHidden(HiddenChannelResponse, EventType)
.
🐞 Fixed
- ComposerView position related to the keyboard with an opaque
UITabBar
. - A proper way to check if members are empty.