Code Monkey home page Code Monkey logo

chat-app's Introduction

How to Build an Ionic Chat App

Read the full tutorial here: [>> How to Build an Ionic Chat App]

Live Demo

This example shows How to Build an Ionic Chat App:

Technology

This demo uses:

  • CometChat
  • Ionic
  • Capacitor
  • Chooser
  • Image Picker
  • Firebase
  • React
  • Uuid
  • Validator

Running the demo

To run the demo follow these steps:

  1. From the dashboard, add a new app called "ionic-chat-app"
  2. Select this newly added app from the list.
  3. From the Quick Start copy the APP_ID, APP_REGION and AUTH_KEY. These will be used later.
  4. Also copy the REST_API_KEY from the API & Auth Key tab.
  5. Navigate to the Users tab, and delete all the default users and groups leaving it clean (very important).
  6. Head to Firebase and create a new project
  7. Create a file called env in the root folder of your project.
  8. Import and inject your secret keys in the env file containing your CometChat and Firebase in this manner.
REACT_APP_FIREBASE_API_KEY=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
REACT_APP_FIREBASE_AUTH_DOMAIN=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
REACT_APP_FIREBASE_STORAGE_BUCKET=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx

REACT_APP_COMETCHAT_APP_ID=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
REACT_APP_COMETCHAT_REGION=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
REACT_APP_COMETCHAT_AUTH_KEY=xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
  1. Install capacitor cli with version 2.4.1
npm install -g @capacitor/cli@2.4.1
  1. Install ionic cli
npm install -g @ionic/cli
  1. cd to your root folder and hit npm i to install the packages.
  2. Run the following statement.
cap sync
  1. Run cd to the ios/App folder then run pod install to install the pods. Once pods are installed run cd .. to go back to the root folder.
  2. build the project by running the following statement.
ionic build
  1. Copy the build folder to your native platform
cap copy
  1. Make sure to include .env file in your gitIgnore file from being exposed online.
  2. Run the project by using Android Studio/Xcode. For more information you can refer to the Ionic documentation

Useful links

chat-app's People

Contributors

adnanaheer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.