A React Native example chat app based on Firebase.
-
Clone down the repository
-
Install your dependencies
npm install
or
yarn install
-
In
ios
folder runpod install
-
Start the iOS app
react-native run-ios
Before you begin, you need a few things set up in your environment To do this you'll need a Firebase project and a Firebase configuration file for your app.
-
Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project associated with your mobile app, click
Import Google Project
. Otherwise, clickAdd project
. -
Click
Add Firebase to your iOS app
and follow the setup steps. If you're importing an existing Google project, this may happen automatically and you can just download the config file. -
When prompted, enter your app's bundle ID. It's important to enter the bundle ID your app is using; this can only be set when you add an app to your Firebase project.
-
At the end, you'll download a
GoogleService-Info.plist
file. You can download this file again at any time. -
If you haven't done so already, add this file to your Xcode project root using the
Add Files
utility in Xcode (From theFile
menu, clickAdd Files
). Make sure the file is included in your app's build target. -
Then you need to enable
Phone Authentication
in Firebase consoleAuthentication
section. -
Open the
GoogleService-Info.plist
configuration file, and look for theREVERSED_CLIENT_ID
key. Copy the value of that key, and paste it into theInfo.plist
'sCFBundleURLSchemes
.
Click here for more information.
If you run into issues starting the apps please refer to the React Native docs. It's most likely a problem with your environment.