More screenshots available at CocoaControls
See the website for the list of features.
- iOS 7.0+
- ARC
CocoaPods (recommended)
# For latest release in cocoapods
pod 'JSQMessagesViewController'
# Latest on develop
pod 'JSQMessagesViewController', :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :branch => 'develop'
# For version 5.3.2
pod 'JSQMessagesViewController', :git => 'https://github.com/jessesquires/JSQMessagesViewController', :branch => 'version_5.3.2_patch'#import <JSQMessagesViewController/JSQMessages.h> // import all the thingsRead the blog post about the 6.0 release!
-
Demo Project
- There's a sweet demo project:
JSQMessages.xcworkspace. - Run
pod installfirst. - Firebase also has a sweet demo project, and it's in Swift!
- There's a sweet demo project:
-
Message Model
- Your message model objects should conform to the
JSQMessageDataprotocol. - However, you may use the provided
JSQMessageclass.
- Your message model objects should conform to the
-
Media Attachment Model
- Your media attachment model objects should conform to the
JSQMessageMediaDataprotocol. - However, you may use the provided classes:
JSQPhotoMediaItem,JSQLocationMediaItem,JSQVideoMediaItem. - Creating your own custom media items is easy! Simply follow the pattern used by the built-in media types.
- Also see
JSQMessagesMediaViewBubbleImageMaskerfor masking your custom media views as message bubbles.
- Your media attachment model objects should conform to the
-
Avatar Model
- Your avatar model objects should conform to the
JSQMessageAvatarImageDataSourceprotocol. - However, you may use the provided
JSQMessagesAvatarImageclass. - Also see
JSQMessagesAvatarImageFactoryfor easily generating custom avatars.
- Your avatar model objects should conform to the
-
Message Bubble Model
- Your message bubble model objects should conform to the
JSQMessageBubbleImageDataSourceprotocol. - However, you may use the provided
JSQMessagesBubbleImageclass. - Also see
JSQMessagesBubbleImageFactoryandUIImage+JSQMessages.hfor easily generating custom bubbles.
- Your message bubble model objects should conform to the
-
View Controller
- Subclass
JSQMessagesViewController. - Implement the required methods in the
JSQMessagesCollectionViewDataSourceprotocol. - Implement the required methods in the
JSQMessagesCollectionViewDelegateFlowLayoutprotocol. - Set your
senderIdandsenderDisplayName. These properties correspond to the methods found inJSQMessageDataand determine which messages are incoming or outgoing.
- Subclass
-
Customizing
- The demo project is well-commented. Please use this as a guide.
- Review the FAQ.
- Search issues for previous and current questions. Do not open duplicates.
- See the StackOverflow tag, which is often the appropriate place for questions and help.
- See the Migration Guide for migrating between major versions of the library.
- Only ask questions that are specific to this library.
- Please avoid emailing questions. I prefer to keep questions and their answers open-source.
Read the docs, available here via @CocoaDocs.
Please follow these sweet contribution guidelines.
Support the development of this free open-source library!
Donations made via Square Cash.
Send $5 Just saying thanks. Here's a coffee! ☕
Send $10 This library is great. Lunch is on me! 🍜
Send $25 This totally saved me time. Go get a nice dinner! 🍴
Send $50 I love this library. I want new features! 👏
Send $100 I really want to support this project! 🎉
Created by @jesse_squires.
Maintained by @jesse_squires and @harlanhaskins.
- Assets extracted using @0xced / iOS-Artwork-Extractor.
- Originally inspired by @soffes / SSMessagingViewController.
- Many thanks to the contributors of this project.
I initially developed this library to use in Hemoglobe for private messages between users.
As it turns out, messaging is something that iOS devs and users really want. Messaging of any kind has turned out to be an increasingly popular mobile app feature in all sorts of contexts and for all sorts of reasons. Thus, I am supporting this project in my free time and have added features way beyond what Hemoglobe ever needed.
Feel free to read my blog and check out my work at Hexed Bits.
According to CocoaPods stats, over 4,000 apps are using JSQMessagesViewController. Here are the ones that we know about. Please submit a pull request to add your app! 😄
JSQMessagesViewController is released under an MIT License. See LICENSE for details.
Copyright © 2013-present Jesse Squires.
Please provide attribution, it is greatly appreciated.




