Hasty Briefsbeta

Bilingual

Native all the way, until you need text

3 days ago
  • #SwiftUI Challenges
  • #macOS Development
  • #Web-Based Solutions
  • The author, a long-time macOS/iOS developer, tried to create a Markdown chat in native Swift/SwiftUI but faced limitations like poor text selection and performance issues.
  • Switching to NSTextView/TextKit 2 and AppKit components like NSCollectionView led to new problems, such as CPU spikes for streaming and cell blinking, with months needed for basic macOS feature parity.
  • Using WebKit for Markdown worked better, but Electron ultimately provided superior performance, typography, and out-of-the-box functionality for text operations and rich rendering.
  • The author concludes that for rich text in chat-heavy apps, native SDKs like SwiftUI become constraints, and web-based solutions (Electron, React Native) offer a viable, high-performance alternative with better text models.