Description
Hi,
First of all, thank you for the amazing work on Revolt iOS. We've forked the repository for our own project and while integrating it, we encountered serious architectural challenges specifically around the chat implementation.
Currently, the chat screen is built heavily with SwiftUI, which unfortunately introduces very complex problems when building a production-grade chat experience. For example:
Handling dynamic message loading, especially loading previous messages (pagination upwards) while maintaining stable scroll positions is extremely difficult in SwiftUI.
Managing precise scroll offset adjustments, inserting messages without causing jumps or flickering, and controlling scroll behavior are very challenging with SwiftUI’s ScrollViewReader and ScrollPosition APIs.
Many low-level behaviors that are critical for chat UX (preserving scroll position while new data is prepended) are either not exposed or extremely hard to control in SwiftUI compared to UIKit.
Because of these limitations, we eventually had to completely rewrite the chat system in UIKit after forking your repo. After switching to UIKit (using UITableView), all scroll position, pagination, and performance issues were fully resolved and are now working smoothly in production.
In our experience, UIKit is still much more reliable and predictable when it comes to complex chat UIs where precise control over layout, scrolling and data insertion is required.
I just wanted to share this in case you consider refactoring parts of the project or encounter similar reports in the future. This feedback might help others struggling with similar challenges.
Thanks again for your great work!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Activity
Zomatree commentedon May 31, 2025
I've been playing around with rewriting the message list already and most likely plan to change it to a UIKit implementation anyway. Where is the source to your fork, id love to take a look at how you implemented it.