TNChat is an open source chat project for iOS that uses Firebase as the backend to perform realtime chat functionality. The main goal of this project is to explore Firebase's realtime database feature in a messaging app. Other goals and challenges in this project are using CoreData to cache conversations and messages. Another minor feature that is interesting is sending silent notifications from Firebase and handling them locally on the device.
The project also includes Firebase' Cloud Function feature, which is used to populate messages in the database to suit the app's needs. The Cloud Function is also used to send silent push notifications to the client, which in its turn parses them, and schedules a local notification with the title being the name of the contact holding the sender's phone number.
- Create your own app in the Firebase Console.
- Enable Cloud Functions from Firebase Console.
- Create and download the
GoogleService-Info.plist
file, and add it to the project. - Create APNS certificates and upload them to the Firebase Console.
- Make sure you set the proper Bundle Identifier for the app and the rest of the Xcode account info.
- Run the app on multiple devices and have fun!
In this project, you can learn the following:
- Firebase Realtime-Database & Cloud Functions.
- Firebase SMS Authentication.
- Silent Notifications and Scheduling Local Notifications on iOS.
- CoreData's NSFetchedResultsController and other features.
- Building a Chat UI for iOS.
- Add
Delivered
andRead
indicator. - Add the ability to delete messages, and conversations.
- Add the ability to forward messages.
- Add the ability to send voice messages.
- Add profile pictures and statuses.
- Turn the Chat UI into a Cocoapod!
TNChat is released under the MIT license. See LICENSE for details.