- Notifications
You must be signed in to change notification settings - Fork1.2k
A community-driven replacement for JSQMessagesViewController
License
MessageKit/MessageKit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A community-driven replacement for JSQMessagesViewController
- Provide a 🚨safe🚨 environment for others to learn and grow through Open Source.
- Make adding Chat:speech_balloon: to a project easy.
- Enable beautiful and customizable Chat UI's.
- Provide an awesome Open Source project for the iOS open source community.
- Help others learn.
Swift Package Manager -Recommended
Swift 5.3 in Xcode 12added support for assets in Swift Packages.You canjust add MessageKit package to your project by entering it's repository URL
https://github.com/MessageKit/MessageKitOlder versions of Swift and Xcode don't support MessageKit via SPM.
- iOS 14 or later
- Swift 6 or later
For iOS 13 or Swift 5.x please use version 4.3.0
For iOS 12 or CocoaPods please use version 3.8.0
For iOS 11 please use version 3.3.0
For iOS 9 and iOS 10 please use version 3.1.1
Please have a look at theQuick Start guide and theFAQs.
We recommend you start by looking at theExample project or write a question with the "messagekit" tag onStack Overflow. You can also look at previous issues here on GitHub with the"Question" tag.
For more on how to use the MessageInputBar, see the dependency it is based onInputBarAccessoryView. You can also see this short guide
Check out the full documentationhere.
Each default cell is a subclass ofMessageContentCell which has 7 parts. From top down we have a:cellTopLabel,messageTopLabel,messageContainerView,messageBottomLabel,cellBottomLabel with theavatarView andaccessoryView on either side respectively. Above we see the basicTextMessageCell which uses aMessageLabel as its main content.
This structure will allow you to create a layout that suits your needs as you can customize the size, appearance and padding of each. If you need something more advanced you can implement a custom cell, which we show how to do in theExample project.
TheInputBarAccessoryView, 3rd party dependency fromInputBarAccessoryView is a flexible and robust way of creating any kind of input layout you wish. Check the repo and examples there for more info.
The type of cell rendered for a given message is based on theMessageKind
publicenumMessageKind{case text(String) // TextMessageCellcase attributedText(NSAttributedString) // TextMessageCellcase photo(MediaItem) // MediaMessageCellcase video(MediaItem) // MediaMessageCellcase location(LocationItem) // LocationMessageCellcase emoji(String) // TextMessageCellcase audio(AudioItem) // AudioMessageCellcase contact(ContactItem) // ContactMessageCellcase linkPreview(LinkItem) // LinkPreviewMessageCell /// A custom message. /// - Note: Using this case requires that you implement the following methods and handle this case: /// - MessagesDataSource: customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell /// - MessagesLayoutDelegate: customCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculatorcase custom(Any?)}
If you choose to use the.custom kind you are responsible for all of the cells layout. AnyUICollectionViewCell can be returned for custom cells which means any of the styling you provide from theMessageDisplayDelegate will not effect your custom cell. Even if you subclass your cell fromMessageContentCell.Read more about custom cells
Read more about the cases on the Quick Start guide.
Great! Look over these things first.
- Please read ourCode of Conduct
- Check theContributing Guide Lines.
- Come join us onSlack and 🗣 don't be a stranger.
- Check out thecurrent issues and see if you can tackle any of those.
- Download the project and check out the current code base. Suggest any improvements by opening a new issue.
- Check out theWhat's Next section 👇 to see where we are headed.
- CheckStackOverflow
- InstallSwiftLint to keep yourself in
style. - Be kind and helpful.
Check out theReleases to see what we are working on next.
Have a question or an issue about MessageKit? Create anissue!
Interested in contributing to MessageKit? Click here to join ourSlack.
Add your app to the list of apps using this library and make a pull request.
- ClassDojo
- Coursicle
- Connect Messaging
- Ring4
- Formacar
- HopUp
- MediQuo
- RappresentaMe
- WiseEyes
- SwiftHub
- Studievenn
- SmooveText
- COYO Engage
- HitchPin
- Charge Running
- HER
- Girlfriend Plus
- Noon Happen
- XPASS
- HeiaHeia
- Starstruck AI
- OutyPlay
Please provide attribution, it is greatly appreciated.
- @SD10, Steven Deutsch
- @nathantannar4, Nathan Tannar
- @zhongwuzw, Wu Zhong
- @austinwright, Austin Wright
- @kaspik, Jakub Kaspar
- @martinpucik, Martin Pucik
Many thanks tothe contributors of this project.
MessageKit is released under theMIT License.
Inspired byJSQMessagesViewController 👈 💯
About
A community-driven replacement for JSQMessagesViewController
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.





