Setup guide for mobile app
Installation and setup
Prerequisites
More information on getting started can be found here
Clone the repository
$ git clone [email protected]:hoory/hoory-mobile-app.git
And install dependencies
$ yarn
Environment Variables
Create .env file under root folder
SENTRY_DSN=
HOORY_WEBSITE_TOKEN=
HOORY_BASE_URL=
POSTHOG_API_KEY=
POSTHOG_API_HOST=
MINIMUM_HOORY_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.jsonfile and place it inside of your project at the following location:android/app/. - Generate iOS credentials from firebase console. Then download the
GoogleService-Info.plistfile . 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 Hoory.xcworkspace file under ios folder. Choose your target device and click playbutton.
Android
- Create
gradle.propertiesfile 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