• Stars
    star
    744
  • Rank 58,569 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 5 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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 MessageKit and it stores and retrieves data to/from Firebase Firestore. The app design is inspired by Facebook Messenger. Clone the iOS Chat App Source Code and add a fully fledged chat to your app in minutes.

Learn how to build your own iOS chat feature with only a few lines of code. Clone this iOS chat app source code and get started by following the steps below. For more details, check out our detailed technical documentation on the official iOS Swift Chat app page.

If you get a build error in latest Xcode, make sure you run Xcode's Legacy Build System (File -> Workspace Settings).


How to run a demo app

  1. Download the source code by cloning this repository
  2. Download the GoogleService-Info.plist file from your Firebase Console and replace the existing file in ChatApp folder. This will connect the app to your own Firebase instance.
  3. Install the pods by running
pod update
  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. Replace the GoogleService-Info.plist file with your own file, downloaded from Firebase Console.
  4. Install the pods
pod update
  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
  1. Customize the UI by updating the ChatUIConfiguration class
    let mainThemeBackgroundColor: UIColor = .white
    let mainThemeForegroundColor: UIColor = UIColor(hexString: "#3068CC")
    let mainTextColor: UIColor = UIColor(hexString: "#000000")
    let mainSubtextColor: UIColor = UIColor(hexString: "#7e7e7e")
    let statusBarStyle: UIStatusBarStyle = .default
    let hairlineColor: UIColor = UIColor(hexString: "#d6d6d6")

    let regularSmallFont = UIFont.systemFont(ofSize: 14)
    let regularMediumFont = UIFont.systemFont(ofSize: 17)
    let regularLargeFont = UIFont.systemFont(ofSize: 23)
    let mediumBoldFont = UIFont.boldSystemFont(ofSize: 17)
    let boldLargeFont = UIFont.boldSystemFont(ofSize: 23)
    let boldSmallFont = UIFont.boldSystemFont(ofSize: 14)
    let boldSuperSmallFont = UIFont.boldSystemFont(ofSize: 11)
    let boldSuperLargeFont = UIFont.boldSystemFont(ofSize: 29)

    let italicMediumFont = UIFont.italicSystemFont(ofSize: 17)

Coded with love and supported by iOS App Templates.

This project was created using React Native Templates.

More Repositories

1

recipes-app-react-native

Recipes App in React Native
JavaScript
709
star
2

react-native-starter-kit

React Native Starter Kit with Firebase Auth and Facebook Login
JavaScript
447
star
3

react-native-firebase

React Native Firebase Starter Project with Auth, Firestore, Storage and Push Notifications
JavaScript
359
star
4

react-native-login-screen-android-ios

React Native Login Screen for Android & iOS
JavaScript
161
star
5

push-notifications-firebase-swift

Push Notifications with Firebase in Swift 5 - Starter Kit (Google Cloud Messaging)
Swift
128
star
6

swift-starter-kit

Swift Starter Kit with Firebase & Facebook Login Onboarding
Swift
123
star
7

tinder-react-native

Tinder Clone in React Native with Swipe Cards
JavaScript
87
star
8

drawer-menu-swift

Drawer menu implementation in Swift 4
Swift
85
star
9

walkthrough-swift-ios-onboarding

Walkthrough Flow in Swift for iOS New User Onboarding Experience
Swift
80
star
10

kotlin-firebase

Kotlin Firebase Starter Project (Authentication, Firestore, Storage)
Kotlin
56
star
11

react-native-walkthrough

React Native Walkthrough User Onboarding Flow to start your react native app development
JavaScript
42
star
12

react-native-firebase-starter

React Native Firebase Starter with Auth, Database and Storage
JavaScript
39
star
13

swift-tutorials

Swift
27
star
14

android-login-screen

Android Login Screen in Kotlin
Kotlin
13
star
15

ios-stripe-checkout

iOS Stripe Checkout in Swift
Swift
11
star
16

react-native-aws

React Native AWS Starter Project
JavaScript
7
star
17

swift-firebase-tutorial

Swift Firebase Tutorial: iOS Login and Registration with Firebase Auth
Swift
4
star
18

instaswift

An open-source Swift framework to make beautiful iOS apps quickly.
3
star
19

instaflutter

An open-source Flutter framework to build beautiful mobile apps quickly.
2
star