Setup guide for mobile app
Installation and setup
Prerequisites
More information on getting started can be found here
Clone the repository
$ git clone git@github.com:chatwoot/chatwoot-mobile-app.git
And install dependencies
$ yarn
Environment Variables
Create .env
file under root folder
SENTRY_DSN=
CHATWOOT_WEBSITE_TOKEN=
CHATWOOT_BASE_URL=
POSTHOG_API_KEY=
POSTHOG_API_HOST=
MINIMUM_CHATWOOT_VERSION=1.15.0
Setup firebase for push notification
- Create a new project in firebase console.
- Generate android credentials from firebase console. Then download the
google-services.json
file and place it inside of your project at the following location:android/app/
. - Generate iOS credentials from firebase console. Then download the
GoogleService-Info.plist
file . Then add this file to project usingXcode
. More details can be found here.
Setup Sentry for error reporting
Create a new project in Sentry
Add SENTRY_DSN
value in .env
file. If you want to supports native crashes, link the sentry SDK to your native projects.
Run the following command to generate the Sentry configuration.
yarn sentry-wizard -i reactNative -p ios android
cd ios && pod install
Running
iOS
cd ios && pod install
yarn ios
OR
Open Chatwoot.xcworkspace
file under ios
folder. Choose your target device and click playbutton.
Android
- Create
gradle.properties
file with following contents underandroid/
folder
android.useAndroidX=true
android.enableJetifier=true
FLIPPER_VERSION=0.54.0
org.gradle.jvmargs=-Xmx4608m
yarn android
Configure and run tests
Add a new brew formula
brew tap wix/brew
Install simulators
brew install wix/applesimutils
Build application:
detox build --configuration ios
Run tests:
detox test --configuration ios --loglevel trace
Manage simulators:
/usr/bin/xcrun simctl list