143

GitHub - instamobile/messenger-iOS-chat-swift-firestore: Messenger - Real-time i...

 5 years ago
source link: https://github.com/instamobile/messenger-iOS-chat-swift-firestore
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Real time Swift iOS Chat with Firebase Firestore

This is an extremely simple implementation of an iOS Swift Chat app. It leverages MessageKit and it stores and retrieves data to/from Firebase Firestore. The app design is inspired by Facebook Messenger.

Learn how to build your own iOS chat feature with only a few lines of code. For more details, check out our detailed technical documentation on the official iOS Swift Chat app page.

68747470733a2f2f7777772e696f7361707074656d706c617465732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30392f73776966742d696f732d636861742d6170702d746872656164732e706e67 68747470733a2f2f7777772e696f7361707074656d706c617465732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30392f73776966742d696f732d636861742d6170702d726f6f6d2e706e67 68747470733a2f2f7777772e696f7361707074656d706c617465732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30392f73776966742d696f732d636861742d6170702d726f6f6d2d6b6579626f6172642e706e67


How to run a demo app

  1. Download the source code by cloning this repository
  2. Install the pods by running
pod install
  1. Open the xcworkspace file with the latest version of Xcode

How to integrate the chat into your app

  1. Download the source code and import the "Core" folder into your Xcode project
  2. Make sure you add all the Podfile dependencies into your own Podfile
  3. Install the pods
pod install
  1. Use the following code to instantiate a chat view controller
let uiConfig = ATCChatUIConfiguration(primaryColor: UIColor(hexString: "#0084ff"),
                                      secondaryColor: UIColor(hexString: "#f0f0f0"),
                                      inputTextViewBgColor: UIColor(hexString: "#f4f4f6"),
                                      inputTextViewTextColor: .black,
                                      inputPlaceholderTextColor: UIColor(hexString: "#979797"))
let channel = ATCChatChannel(id: "channel_id", name: "Chat Title")
let viewer = ATCUser(firstName: "Florian", lastName: "Marcu")
let chatVC = ATCChatThreadViewController(user: viewer, channel: channel, uiConfig: uiConfig)

// Present the chatVC view controller

Coded with love and supported by iOS App Templates.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK