Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

iMessage Clone

iMessage Clone is a sample app implemented using Stream Chat and React Native. It is a fully fledged messaging app built using core packages.

⚠️ Please don't simply copy-paste the code in your project. Projects in this repository are just the demostrations for power of Stream Chat and React Native, and should not be used as source for ready to publish application.

Getting Started

Before running this project please ensure React Native is installed and configured on your machine. If you're new to React Native, please checkout the official guide with installation instructions for your OS.

This project is only configured to support the following platforms:

  • Android
  • iOS

Web and Desktop are not supported at this time.

After installing React Native and the necessary toolchain for your device (Android or iOS), connect your device or open your emulator before running the following:

Clone the repo

git clone https://github.com/GetStream/react-native-samples

Open the app folder

cd react-native-samples/iMessageClone

Install package dependencies:

# Install npm dependencies
yarn

# Install pod dependencies
npx pod-install

Run the project on your device or emulator:

npx react-native run-ios

Environment variables

  • Create an .env file in root folder of this project:
touch .env
  • And set following environment variables in .env file.

  • STREAM_API_KEY

  • STREAM_USER_ID

  • STREAM_USER_TOKEN

Generate Test Users and Chat Data

  • Create a new app in our dashboard (or use existing one if you have already)
  • Set your api key and api secret in test-data-cli.config.js file.
  • Run the following command:
yarn create-channels --config="test-data-cli.config.js"
  • The output of this command will include bunch of user ids and their respective token. You can copy-paste any of the listed user id & token to .env file.