AsyncMessagesViewController alternatives and similar libraries
Based on the "Messaging" category.
Alternatively, view AsyncMessagesViewController alternatives based on common mentions on social networks and blogs.
-
SlackTextViewController
DISCONTINUED. A drop-in UIViewController subclass with a growing text input view and other useful messaging features. -
NMessenger
DISCONTINUED. A fast, lightweight messenger component built on AsyncDisplaykit and written in Swift -
ExyteChat
A SwiftUI Chat UI framework with fully customizable message cells and a built-in media picker -
Messenger Chat with Firebase
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift -
ChatLayout
ChatLayout is an alternative solution to MessageKit. It uses custom UICollectionViewLayout to provide you full control over the presentation as well as all the tools available in UICollectionView. It supports dynamic cells and supplementary view sizes. -
LayerKit
DISCONTINUED. iOS SDK for Layer, the easiest way to add in-app messaging (text, photos, videos, data) to any mobile or web application. -
OTTextChatAccelerator
DISCONTINUED. OpenTok Text Chat Accelerator Pack enables text messages between mobile or browser-based devices.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AsyncMessagesViewController or a related project?
README
AsyncMessagesViewController
A smooth, responsive and flexible messages UI library for iOS apps. Built on top of the awesome Texture (formerly AsyncDisplayKit) framework, it takes full advantage of asynchronous layout and rendering to deliver a "butter smooth" scrolling experience.
[Screenshot1](Screenshots/screenshot1.png) [Screenshot2](Screenshots/screenshot2.png)
Dependencies
Requirements
- iOS 9 and later.
- Swift 4.
- ARC.
Installation
From CocoaPods:
pod 'AsyncMessagesViewController'
Without CocoaPods
Copy the Source\
directory to your project and install all dependencies.
How to use
- Example project
- Run
pod install
. - Open
AsyncMessagesViewController.xcworkspace
. - Enjoy the simple
ViewController.swift
class.
- Run
- Model
- Your message model object should conform to
MessageData
protocol.
- Your message model object should conform to
- View
MessageCellNode
is your friend. Most of the time you don't want to subclass it.- There are 2 basic built-in bubble nodes implemented for you:
MessageTextBubbleNode
for text based messages andMessageNetworkImageBubbleNode
for remote image based messages. - Need a custom bubble node? Here you go.
- Controller
- Your view controller should subclass
AsyncMessagesViewController
. As you may see, it's a very simple view controller (and should be). Most of the magic is in the data source. - What data source, you may ask. Any data source that conform to
AsyncMessagesCollectionViewDataSource
protocol. - There is a default implemention:
DefaultAsyncMessagesCollectionViewDataSource
. This class keeps a sorted list of messages, but doesn't allow you to change them directly. Instead, you must alter messages using given methods in its protocol and let it handle the heavy work. It can (supposedly) smartly determine which cells need to be inserted, deleted and reloaded. Why? because: - Calling
reloadData
is very expensive onASCollectionView
(andASTableView
). - Most of the time, inserting/deleting a cell causing UI changes in other cells as well.
DefaultAsyncMessagesCollectionViewDataSource
can detect those changes automatically. MessageCellNodeMetadata
provides runtime-computed information about a message and how its data should be presented in aMessageCellNode
. Metadata of a message is often computed based on the relationship with other messages. For example, message's sender name should be displayed if it is an incoming message and is the first one in a set of consecutive messages sent by a same user. Or message's date should be shown if it is the first message sent within a 15 minutes window. This kind of UI logic is encapsulated inMessageCellNodeMetadataFactory
and computed at runtime. Of course you can implement your own logic.
- Your view controller should subclass
Customizations
- Custom bubble node:
- Please read this guide on subclassing
ASDisplayNode
. - Implement a factory that conforms to
MessageBubbleNodeFactory
protocol. - Inject your factory to
DefaultAsyncMessagesCollectionViewDataSource
via its initializer. - Inject the data source to
AsyncMessagesViewController
(also via its initializer).
- Please read this guide on subclassing
- Custom bubble image's colors:
- Initiate a
MessageBubbleImageProvider
with whatever colors you want. - Inject it to your data source.
- Inject the data source to your view controller.
- Initiate a
- Custom bubble images:
- Implementing your own
MessageBubbleImageProvider
. - Inject it to your data source.
- Inject the data source to your view controller.
- Implementing your own
- Custom logic for computing cell metadata:
- Subclass
MessageCellNodeMetadataFactory
and override any neccessary method. - Inject it to your data source.
- Inject the data source to your view controller.
- Subclass
- Custom format for message date:
- Subclass
MessageTimestampFormatter
and overrideattributedTimestamp(NSDate)
. - Inject it to your data source.
- Inject the data source to your view controller.
- Subclass
- Any customization related to the input toolbar:
- Please take a look at SlackTextViewController itself.
- Other customizations:
- File an issue and I will be more than happy to help :)
Contributing
All feedbacks, questions and pull requests are very welcome. See [here](CONTRIBUTING.md) for details.
Credits
Created by Huy Nguyen, an Android developer :)
- Inspried by JSQMessagesViewController and Atlas.
License
AsyncMessagesViewController
is released under an MIT License. See [here](LICENSE) for details.
Copyright © 2015 Huy Nguyen.
*Note that all licence references and agreements mentioned in the AsyncMessagesViewController README section above
are relevant to that project's source code only.