Frame 1 (2).png

ChatUI is an open-source Swift package that provides a simple and reliable solution for implementing chat interfaces using SwiftUI.

Simulator Screen Shot - iPhone 14 Pro - 2023-02-21 at 15.56.41.png

Simulator Screen Shot - iPhone 14 Pro - 2023-02-21 at 15.57.45.png

Simulator Screen Shot - iPhone 14 Pro - 2023-02-21 at 16.01.37.png

📜 Overview


Why ChatUI?

There are many companies that provide Chat SDK, such as Firebase, Sendbird, GetStream, and Zendesk. This means that the interface we use to implement chat functionality depends on our choice of SDK. While Apple's UI framework, SwiftUI, allows for incredibly flexible and fast UI design, there is a lack of available information on how to implement chat functionality, particularly when it comes to managing scrolling in message lists. To solve this problem, some Chat SDK companies offer their own Chat UI kits. However, since one UIKit only supports one SDK, there is no guarantee that a given UIKit will support the Chat SDK we are using, and switching to a different Chat SDK can create significant UI issues.

Nevertheless, you know that different Chat SDKs essentially have the same meaning and essence despite different interface names and forms. If you conform to the protocols provided by ChatUI for the channels, messages, and users that we want to implement UI for, ChatUI can draw a SwiftUI-based chat UI based on this information.

Although ChatUI currently offers very limited features, I’m confident that it can provide best practices for implementing chat interfaces using SwiftUI. Additionally, since ChatUI is an open source project, you can expand its capabilities and create a more impressive ChatUI together through contributions. I appreciate your interest.

Installation

ChatUI is an open-source Swift package that provides a simple and reliable solution for implementing chat interfaces using SwiftUI.

To use ChatUI in your project, follow these steps:

  1. In Xcode, select File > Swift Packages > Add Package Dependency.
  2. In the search bar, paste the ChatUI URL: **https://github.com/jaesung-0o0/ChatUI**
  3. Select the branch as main to install.
  4. Click Next, and then click Finish.

Usage

To use ChatUI in your project, add the following import statement at the top of your file:

import ChatUI