Latest 1.0.5
Homepage https://github.com/marcocapano/MCChatModule
License MIT
Platforms ios 11.0, requires ARC
Authors

A simple chat module to integrate with your app.

Swift Version
License
CocoaPods Compatible
Platform
PRs Welcome

Example

Want to see it in action? There is an Example folder with an iOS Project ready to be tested on your devices! Download it and run pod install , then use the .workspace.

MCChatModuleMCChatModule

Features

  • [x] Customizable
  • [x] Supports both landscape and portrait

Requirements

  • iOS 11.0+
  • Xcode 9.3

Installation

CocoaPods

You can use CocoaPods to install MCChatModule by adding it to your Podfile:

platform :ios, '11.0'
use_frameworks!
pod 'MCChatModule'

To get the full benefits import MCChatModule wherever you import UIKit

import UIKit
import MCChatModule

Manually

  1. Download and drop Sources in your project.
  2. Congratulations!

Use

Creating a chat screen is as simple as:

class ExampleChatViewController: MessagesCollectionViewController, MessagesCollectionViewControllerDataSource {

    ///The messages to display
    var messages = [MessageType]() {
        didSet {
            collectionView?.reloadData()
        }
    }

    override func viewDidLoad() {
        datasource = self
    }

    func message(for indexPath: IndexPath) -> MessageType {
        return messages[indexPath.item]
    }

    func numberOfMessages() -> Int {
        return messages.count
    }
}

and setting the controller delegate property to customize the style.

Contribute

Pull requests and issues are welcome.

Notes

This project is intended as an exercise for both the chat module and pod creation (dealing with podspec is harder than coding😂) but you can still use it in your projects if you want. If you want more features and a supportive community, I would suggest using MessageKit

Please do not expect continuous support.

Creator:
Marco Capano – @marcocapano1[email protected]

Thanks to @SD10 for helping with podspec.

Distributed under the MIT license. See LICENSE for more information.

Latest podspec

{
    "name": "MCChatModule",
    "version": "1.0.5",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "summary": "A simple chat module to integrate with your app.",
    "homepage": "https://github.com/marcocapano/MCChatModule",
    "social_media_url": "https://twitter.com/marcocapano1",
    "authors": {
        "Marco Capano": "[email protected]"
    },
    "source": {
        "git": "https://github.com/marcocapano/MCChatModule.git",
        "tag": "1.0.5"
    },
    "source_files": "Sources/**/*.swift",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This