An experimental Twitch client for iOS built with SwiftUI.
MIT License
Note: This app mainly served as a prototype and has been put on hold in favor of a new one built with Flutter. See it here, and if you're interested in why this decision was made, read below.
A Twitch client for iOS built with SwiftUI (and some UIKit).
Unfortunately, SwiftUI is currently not fit to support an effective Twitch chat. Until Apple releases performant layouts similar to span (HTML) or flex wrap, this app won't be able to achieve a consistent chat. The issues described next prevent this app from reaching its full potential and have made me put it on hold.
These issues may be fixable, but would lead to a workaround-rabbit-hole that I've already gone far enough into and don't have enough time for. This led me to look into other declarative mobile frameworks with iOS support, specifically React Native and Flutter.
While experimenting with React Native (RN), issues 1 and 2 persisted. This was somewhat unsurprising as RN uses native components under the hood. Although RN does have flex wrap, span was still necessary to have elements truly inline with text. As a result, the prototype was promptly scrapped.
While working with Flutter, it was clear that the team wanted to bring web-specific behaviors to mobile. Features like TextSpan/WidgetSpan, synced GIFs, height-only image sizing, and more are core features of the framework.
Since I was trying to emulate the web Twitch chat experience on iOS, it made perfect sense to take advantage of these features. Having the app work identically on Android through the Skia engine was a neat bonus too.
Flutter is not the perfect framework by any means and has its own issues and caveats, but it's the best framework to achieve the goals of this app. See the Flutter version here.