stream-chat-swift
stream-chat-swift copied to clipboard
Modern state layer
π Issue Links
Resolves ios-issues-tracking/728
π― Goal
Add a modern state layer with async-await and observable state objects
π Summary
A new set of types which represent a new way how to interact with Stream API (alternative way to controllers).
- Leverages async-await
- Method calls wait for API requests to finish
- Main actor guarded state objects for easy way for observing data changes
New types:
- ChannelList & ChannelListState
- Chat & ChatState + MessageState
- ConnectedUser + ConnectedUserState
- MemberList + MemberListState
- MessageSearch + MessageSearchState
- ReactionList + ReactionListState
- UserList + UserListState
- UserSearch + UserSearchState
βοΈ Contributor Checklist
- [x] I have signed the Stream CLA (required)
- [x] This change follows zero β οΈ policy (required)
- [x] This change should be manually QAed
- [x] Changelog is updated with client-facing changes
- [x] New code is covered by unit tests
- [ ] Comparison screenshots added for visual changes
- [x] Affected documentation updated (docusaurus, tutorial, CMS)
StreamChat XCMetrics
target |
metric |
benchmark |
branch |
performance |
status |
---|---|---|---|---|---|
MessageList | Hitches total duration | 10 ms | 5.01 ms | 49.9% πΌ | π’ |
Duration | 2.6 s | 2.55 s | 1.92% πΌ | π’ | |
Hitch time ratio | 4 ms per s | 1.97 ms per s | 50.75% πΌ | π’ | |
Frame rate | 79 fps | 78.04 fps | 1.22% πΌ | π’ | |
Number of hitches | 1 | 0.6 | 40.0% πΌ | π’ | |
ChannelList | Hitches total duration | 12.5 ms | 1.67 ms | 86.64% πΌ | π’ |
Duration | 2.6 s | 1.37 s | 47.31% πΌ | π’ | |
Hitch time ratio | 5 ms per s | 1.17 ms per s | 76.6% πΌ | π’ | |
Frame rate | 76 fps | 86.89 fps | -14.33% π½ | π΄ | |
Number of hitches | 1.2 | 0.2 | 83.33% πΌ | π’ |
Quality Gate passed
Issues
98 New issues
0 Accepted issues
Measures
0 Security Hotspots
84.8% Coverage on New Code
0.0% Duplication on New Code