MessengerKit is a drop-in UI for messenger interfaces on iOS built in Swift

Related tags

Chat chat swift messenger
Overview

MessengerKit for iOS

License: MIT


About

MessengerKit is a drop-in UI for messenger interfaces on iOS built in Swift. Centred around a single UIViewController, MessengerKit is themeable to fit your needs and includes a number of powerful features:

  • UICollectionView based with pre-loading and caching of size calculation for bubbles.
  • Auto-growing input view.
  • Multiple included cell types: text, large-emoji, image, video.
  • Presentation of SFSafariViewController
  • Built-in, customisable themes.
  • A custom theming system to bring your own UICollectionViewCells, headers, footers, and input views.
  • Avatar support (currently only in the travamigos theme).

The framework was built for and is used in production at Travamigos.

Screenshots

MessengerKit Examples

Documentation

Installation

MessengerKit requires Swift 4.2 and iOS 10.0 or later.

Manual

Drag the contents of the MessengerKit folder into your Xcode Project.

CocoaPods

Add the following to your project's Podfile.

pod 'MessengerKit', :git => 'https://github.com/steve228uk/MessengerKit.git'

Credits

MessengerKit was written by @steve228uk for Travamigos and is available under the MIT license.

It makes use of KeyboardUtility by @JunyuKuang.

Comments
  • Custom Message Formats

    Custom Message Formats

    Hi @steve228uk,

    Amazing framework! A small question from someone new to iOS dev. I wanted to use MSGMessageBody with custom content (neither text, emoji, image, nor video) but am unsure as to what should be modified to implement this. For instance, I want to have a message bubble with a clickable UIButton inside it. Do you think you could help point me towards what/where I should modify to add such custom message formats?

    enhancement 
    opened by svm1 33
  • Could not load the

    Could not load the "Arrow" image

    Hi there, awesome framework! Quick question :

    After run pod install, implement MSGMessengerViewController, then somehow I got this error :

    Could not load the "Arrow" image referenced from a nib in the bundle with identifier "org.cocoapods.MessengerKit"

    What did I missed ?

    MessengerKit v 1.0.0

    screen shot 2018-07-03 at 12 31 01 pm

    It did work if I change the MSGMessengerStyle to .travamigos style.

    But the arrow is still missing...

    screen shot 2018-07-03 at 12 58 38 pm

    bug question 
    opened by gersonjanhuel 10
  • NSFetchedResultsController and sections

    NSFetchedResultsController and sections

    Hi @steve228uk,

    First of all thanks for this super easy to use library!

    I am using it with a NSFetchedResultsController, and I am struggling myself trying to get by free the messages grouped by username after ordered by timestamp, but I am not succeeding.

    If I provide the date as sort descriptor, and the user as sectionNameKeyPath, it groups the messages by user, so I get numberOfUsers sections, and ordered by timeStamp inside, but that's not what I want; I want by date, but grouped by user just if the messages are in a sequence, like your example.

    I guess you (or someone) has faced this problem before, I hope haha.

    Thanks in advance

    opened by machukas 6
  • Blank text is shown after send some text

    Blank text is shown after send some text

    On the first time, when the MSGMessengerViewController loads, blank text is shown when send some text. And the text which are send once scrolled, the order of the messages gets misplaced.

    screenshot 2019-01-02 at 10 58 12 am

    question 
    opened by V1992 4
  • Could not set text to message input view

    Could not set text to message input view

    Hi, first things first thank you for this great library and hours that you saved for me. in my case i needed to add custom inputView for adding additional features like attach and stickers but now i have a problem. in my app users can edit their messages but because of internal protection level of text property of MSGPlaceholderTextView i can't set text so user can edit it. any ideas for accomplishing this?

    opened by mkhakpaki 4
  • Fix link style & Add underline option

    Fix link style & Add underline option

    The link style option for incoming & outgoing messages were not correct. Only the outgoing option was used. I fixed that in this PR.

    Additional I added a style option for control the underline setting for links.

    opened by Fabi755 3
  • MSGMessengerViewController unregisters host app observers from NotificationCenter

    MSGMessengerViewController unregisters host app observers from NotificationCenter

    Version: 1.0.4 Reproduction rate: always Description: Currently a VC that derives from MSGMessengerViewController.swift is hidden the default behaviour is to remove the VC from the NotificationCenter. However this affects ALL observers in the derived VC, not just those registered by MessengerKit.

    Case in point, my app needs to keep a notification with NotificationCenter that happens as soon as the app comes to the foreground (via deep link). Because MSGMessengerViewController unregisters on going to the background this behaviour is broken. Now I need to re-register with NotificationCenter after calling super in viewDidDisappear to keep the correct behaviour in place.

    MSGMessengerViewController should only unregister from notifications that it has registered for before instead of unregistering all: NotificationCenter.default.removeObserver(self, name: UIKeyboardWillShow, object: nil)

    bug good first issue 
    opened by parrotbait 3
  • iOS 9 Support

    iOS 9 Support

    Hello guys, this is such a wonderful library! I was wondering, why is iOS 9 not supported? I've forked the project and easily lowered deployment target to 9.0, after adding some

    @available(iOS 9.0, *)
    

    checks, library runs pretty smooth in iOS 9. I can make a pull request if someone wants this too.

    Let me know, thanks :)

    wontfix 
    opened by alessioarsuffi 3
  • Custom Input view is jumping upwards automatically without typing

    Custom Input view is jumping upwards automatically without typing

    If I start typing on custom inputview textfield and go back to any previous screen. After that when I reopened MSGMessengerViewController screen for infinite times automatically the input view will jump up always. I want to prevent this and instead of that the custom input view should only jumps up when start typing something on it. I dont find any solution for this. Pls help.

    skype_picture

    bug 
    opened by V1992 3
  • when push/present subclass ViewController of MSGMessengerViewController

    when push/present subclass ViewController of MSGMessengerViewController

    got error from storyboard

    let vc = CalmConstants.globalConstants.StoryBoard.instantiateViewController(withIdentifier: "ReadingVC") as! ReadingVC
     self.present(vc, animated: true, completion: nil)
    

    where ReadingVC is subclass of MSGMessengerViewController

    • Assertion failure in -[UIStoryboard instantiateViewControllerWithIdentifier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.84.15/UIStoryboard.m:171
    question 
    opened by nitinumaretiya123 3
  • Error when calling insert()

    Error when calling insert()

    When I call self.insert in my MSGMessengerViewController I get the error Thread 1: EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8) on the line self.collectionView.performBatchUpdates({ in the MSGMessengerViewController + Helpers.swift file. If there's anymore information I should give, please let me know. :D

    question 
    opened by astrike30 3
  • How can I add Caption for Image type

    How can I add Caption for Image type

    Creating an interesting way to take a note by using MessangerKit. I absolutely love the MessangerKit. https://apps.apple.com/us/app/nanonote-note-to-self/id1575376162#?platform=iphone

    I want to add a caption in the image, same as whatsapp. I am stuck at this stage for the last couple of hours. Any help will be really appreciated. Simulator Screen Shot - iPhone 12 - 2021-07-25 at 15 19 49

    @steve228uk I really like to thank you, You save a lot of time mine by creating this project.

    opened by santudey 0
  • UI error after camera captured.

    UI error after camera captured.

    I am trying to send an image from the camera. so I opened chat vc and entered camera caputure screen using UIImagePickerController. Inputview went up to the top and the UI was messed up. This problem has only happened after the first loading.

    IMG_5061 (1)

    How can I avoid this problem?

    opened by lucasanh 0
  • Add Swift Package Manager support

    Add Swift Package Manager support

    Hi,

    This PR contains the following changes to add SPM support:

    • Add the package manifest
    • Add an objc name to custom views to load correctly in SPM (See this forum for details)

    Close #53

    opened by woxtu 0
  • Override delegate method for collectionView

    Override delegate method for collectionView

    When I override the delegate method func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? for collectionView, I get error

    Method does not override any method from its superclass

    How can I call the context menu for collection?

    opened by emelyanovkirill 0
  • Initialize the image in nil so no flicker from the previous image

    Initialize the image in nil so no flicker from the previous image

    When images were added to the conversations, before downloading, the previous image was shown moments previous to the finished download. Initializing the image in nil before loading the new image fixes the flicker issue.

    opened by jgalindosl 0
  • Remove input text view

    Remove input text view

    Is there away to remove the input text view? I tried doing: style.inputView = TrivialInputView.self

    And defining a TrivialnputView by modifying what is found here: https://github.com/steve228uk/MessengerKit/blob/05168377536ebeae3653edfa5acc6410895cd72f/MessengerKit/Input/Styles/iMessage/MSGImessageInputView.swift.

    But it crashes outright with error: Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value for tint color. Even though it is specified.

    opened by lingxiao 0
Releases(1.0.2)
  • 1.0.2(Jul 3, 2018)

    Added the ability to set custom data as the message body. Use the new custom(Any) case as well as the customOutgoing and customIncoming cell identifiers. The wiki has been updated with some new information.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jul 2, 2018)

Owner
Stephen Radford
Stephen Radford
iOS - Real-time messaging app 🎨

General mChat is a real-time messaging app written in Swift for iOS devices. Since mChat uses a fast and reliable Firebase Database, it receives data

Vitaliy Paliy 569 Nov 28, 2022
Chatto is a Swift lightweight framework to build chat applications.

Chatto is a Swift lightweight framework to build chat applications. It's been designed to be extensible and performant. Along with Chatto there is ChattoAdditions, a companion framework which includes cells for messages and an extensible input component. You can find more details about how it was implemented in our blog. See them in action!

Badoo Tech 4.4k Dec 29, 2022
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift

Real time Swift iOS Chat with Firebase - Messenger Clone This is an extremely simple chat app source code of an iOS Swift Chat app. It leverages Messa

Instamobile 616 Jan 1, 2023
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift

Real time Swift iOS Chat with Firebase - Messenger Clone This is an extremely simple chat app source code of an iOS Swift Chat app. It leverages Messa

Instamobile 615 Dec 27, 2022
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift

Real time Swift iOS Chat with Firebase - Messenger Clone This is an extremely simple chat app source code of an iOS Swift Chat app. It leverages Messa

Instamobile 621 Jan 6, 2023
Swift tool to generate Module Interfaces for Swift projects.

ModuleInterface Swift tool to generate Module Interfaces for Swift projects. What is a Module Interface A Module Interface is what we commonly get usi

Jorge Revuelta 75 Dec 21, 2022
🌟🌟🌟🌟🌟 Falcon Messenger is a Fast and Beautiful cloud-based messaging app. With iOS and IPadOS Support. Available on the App Store.

Open the FalconMessenger.xcworkspace in Xcode. Change the Bundle Identifier to match your domain. Go to Firebase and create new project. Select "Add F

null 397 Dec 31, 2022
Open source, native iOS Messenger, with realtime chat conversations (full offline support).

OVERVIEW This is a native iOS Messenger app, with realtime chat conversations (full offline support). NEW FEATURES Passcode support GraphQL server sup

Related Code 4.5k Dec 26, 2022
A private messenger for iOS.

Signal iOS Signal is a free, open source, messaging app for simple private communication with friends. Also available on Android and Desktop. Question

Signal 9.6k Dec 26, 2022
Open source, native iOS Messenger, with realtime chat conversations (full offline support).

OVERVIEW This is a native iOS Messenger app, with realtime chat conversations (full offline support). NEW FEATURES Passcode support GraphQL server sup

Related Code 4.5k Jan 9, 2023
Chat SDK iOS - Open Source Mobile Messenger

Chat SDK Open Source Messaging framework for iOS Chat SDK is a fully featured open source instant messaging framework for iOS. Chat SDK is fully featu

Chat SDK 879 Jan 6, 2023
Phantom Anonymous Messenger for iOS

?? Phantom for iOS This repository contains the complete source code of Phantom for iOS. Table of Contens ?? Report Bugs/Feature Requests/Security Iss

null 2 Mar 14, 2022
You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.

PullToDismiss PullToDismiss provides dismiss modal viewcontroller function like Facebook Messenger by pulling scrollview or navigationbar with smooth

Suguru Kishimoto 479 Dec 5, 2022
You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.

PullToDismiss PullToDismiss provides dismiss modal viewcontroller function like Facebook Messenger by pulling scrollview or navigationbar with smooth

Suguru Kishimoto 479 Dec 5, 2022
Jake Brown Tech Messenger With Swift

Open the FalconMessenger.xcworkspace in Xcode. Change the Bundle Identifier to m

Jake Brown 3 Feb 20, 2022
A full stack real time messenger clone. Frontend is written in swift, and the backend is written in javascript.

FullStack-Messenger-Project A full stack real time messenger clone. Frontend is written in swift, and the backend is written in javascript. The Fronte

Arkash Vijayakumar 6 Nov 29, 2022
Non-intrusive iOS UI library to implement overlay based interfaces

OverlayContainer is a UI library written in Swift. It makes easier to develop overlay based interfaces, such as the one presented in the Apple Maps, S

Applidium 1k Jan 4, 2023
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

Kishikawa Katsumi 34 Sep 26, 2022
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

Kishikawa Katsumi 34 Sep 26, 2022