I spent about a year rebuilding iMessage in SwiftUI. It's very accurate, bubbles that only get a tail at the end of a series, typing dots breathe in a wave, Delivered fades into Read, the keyboard can be dragged down from the top of the input bar, bubbles are on springs. It uses a UICollectionView, because List and ScrollView can't do that stuff.
This week I made it free and tagged 1.0 as Swift Chat.
import SwiftChat
Chat(messages) { message in
Message(message.text, role: message.role, timestamp: message.sentAt)
.messageStatus(message.status)
}
.chatTypingIndicators(typing)
.chatInputCapabilities([.photoLibrary, .files])
.onChatSend { text, media in
await conversation.send(text, media)
}
Photos and videos in bubbles, reactions, group chats, typing indicators, read receipts, pagination. iOS 18+, Swift 6.
- Site with every modifier: Swift Chat: iMessage, rebuilt as a SwiftUI view
- The post-mortem on why nobody wanted it originally: I rebuilt iMessage line for line. Nobody wanted it. — Ben Sage
Happy to answer anything. Keyboard management was probably the hardest part.