Swiftychat

A lightweight SwiftUI chat UI framework with 11 built-in message types, 8 themes, and cross-platform iOS/macOS support

Last verified:

Visit Swiftychat

What is Swiftychat?

SwiftyChat is a lightweight SwiftUI chat UI (client) framework designed to help developers quickly build chat interfaces for iOS and macOS applications. It provides a simple Chat Interface to quick start with built-in message cells, eliminating the need to create chat UI components from scratch. The framework is open-source and available via Swift Package Manager, making integration straightforward for SwiftUI projects.

Key features include support for multiple message kinds: text (with emoji auto-scaling), images (from local UIImage or remote URL), locations (using MapKit), contacts, quick reply options, scrollable carousels with title/subtitle/image/button, and video messages. The framework also offers attributed string support, landscape orientation support with autoscaling, user avatars with customizable positions, keyboard dismissal on tapping outside, multiline input bar, scroll to bottom functionality, picture-in-picture background video playing, and the ability to implement custom message cells.

SwiftyChat is ideal for iOS and macOS developers building messaging apps, chatbots, customer support interfaces, social networking features, or any application requiring chat functionality. It supports customization through ChatMessageCellStyle for styling incoming/outgoing text, cell edge insets, avatars, images, quick replies, carousels, and locations. The framework is open-source under Apache-2.0 license with 301 GitHub stars and 20 releases, indicating active maintenance and community adoption.

Swiftychat pricing

Pricing model: Freemium

Free and open-source under Apache-2.0 license. Available via Swift Package Manager at https://github.com/EnesKaraosman/SwiftyChat.git. No paid tiers or subscriptions - completely free to use for personal and commercial projects. The project is maintained by Enes Karaosman and accepts sponsorships through GitHub Sponsors.

Swiftychat pros

  • Lightweight SwiftUI framework easy to integrate
  • Built-in message cells for quick start
  • Supports 7 message kinds: text, image, location, contact, quickReply, carousel, video
  • Attributed string support native to SwiftUI
  • Landscape orientation support with autoscaling
  • User avatar with multiple position options and optional usage
  • Dismiss keyboard on tapping outside
  • Multiline input bar included (BasicInputView)
  • Scroll to bottom functionality
  • Picture-in-picture background video mode support
  • Round specific corners of text messages
  • Support for custom message cells
  • Swipe to dismiss keyboard
  • Context menu support shown in advanced preview
  • Open-source under Apache-2.0 license
  • Cross-platform support for iOS and macOS
  • 301 GitHub stars indicating community trust
  • 20 releases showing active maintenance

Swiftychat cons

  • No built-in backend or server support
  • Client-side framework only, requires own backend
  • No built-in authentication system
  • No real-time messaging built-in (WebSocket/WebRTC)
  • No push notification support included
  • No message encryption or security features built-in
  • No chat history persistence layer provided
  • No moderation or content filtering features
  • Requires custom InputView implementation for advanced features
  • No Android or Windows platform support

Frequently asked questions about Swiftychat

What is SwiftyChat?

SwiftyChat is a lightweight SwiftUI chat UI (client) framework with built-in message types, theming, and cross-platform support for iOS and macOS. It provides a simple Chat Interface to quick start with built-in message cells, eliminating the need to create chat UI components from scratch.

How do I install SwiftyChat?

Install SwiftyChat via Swift Package Manager using the URL https://github.com/EnesKaraosman/SwiftyChat.git. Add it to your Xcode project through File > Add Packages and enter the SPM URL.

What message types does SwiftyChat support?

SwiftyChat supports 7 message kinds: text (with emoji auto-scaling), image (from local UIImage or remote URL), location (pins on MapKit), contact (for sharing), quickReply (multiple options that disable after selection), carousel (scrollable view with title, subtitle, image & button), and video (opens given URL).

Can I customize the chat appearance?

Yes, SwiftyChat provides ChatMessageCellStyle class for full customization. You can style incoming/outgoing text styles, cell edge insets, contact style, image style, quick reply style, carousel style, location style, and incoming/outgoing avatar styles. All styles have default initializers and can be injected as environmentObject.

Does SwiftyChat support custom message cells?

Yes, you can implement custom message cells. See CustomMessage.md in the repository for details on how to create and use your own custom message cell implementations beyond the built-in message kinds.

What platforms does SwiftyChat support?

SwiftyChat supports iOS and macOS platforms only. It is built with SwiftUI and does not support Android, Web, or Windows. There is a separate Flutter version available at https://github.com/EnesKaraosman/swifty_chat for cross-platform Flutter projects.

How do I add an input bar to SwiftyChat?

SwiftyChat includes BasicInputView that you can investigate and use if it suits your needs. The recommended approach is to clone BasicInputView and modify it (e.g., add camera icon). You pass your input bar view as a closure to ChatView.

Does SwiftyChat work in landscape orientation?

Yes, SwiftyChat supports landscape orientation and autoscales message cells with the given cellWidth property if it exists. This ensures chat messages display properly in both portrait and landscape modes.

What license is SwiftyChat under?

SwiftyChat is licensed under Apache-2.0 license, which means it is free to use for both personal and commercial projects. You are also encouraged to contribute by creating PRs for features or bug fixes.

Who maintains SwiftyChat?

SwiftyChat is maintained by Enes Karaosman. The project has 301 GitHub stars, 13 watchers, 56 forks, and 20 releases with the latest version 2.7.4 released on Nov 15, 2024. The project accepts sponsorships through GitHub Sponsors.

Categories

Use cases

Browse all AI tools on NeedAnAI