Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 2.03 KB

CONTRIBUTING.md

File metadata and controls

88 lines (57 loc) · 2.03 KB

Welcome to Courier React Native contributing guide

Getting Started

  1. From root, run: yarn setup
  2. Run open example/.env, add your testing credentials, and save the file
  3. Drag and drop your google-services.json file into example/android/app (Needed for Firebase FCM testing)

From here, you are all set to start working on the package! 🙌

Testing & Debugging

While developing, you can run the example app to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

To run the React Native example app use:

yarn example android

or

yarn example ios

To debug the Android package:

  1. Run yarn example android from root
  2. Open example/android in Android Studio
  3. Click Debug

To debug the iOS package: TODO

Details about yarn setup

While it's possible to use npm, the tooling is built around yarn, so you'll have an easier time if you use yarn for development.

Link the project

in the root directory run:

yarn link

navigate to example directory, run:

yarn link @trycourier/courier-react-native

Setup Env variables

in the example directory run:

yarn setupEnv

a .env file will be created in the example directory populate the variables with appropriate values

Android sdk setup

open android studio

  • open the android folder in root directory in android studio,
  • open example/android folder in android studio. wait for gradle build to finish

in example/android directory change the tab to project, paste google-services.json in CourierReactNativeExample/app directory

To start the packager:

connect your android device

check if your device is available under adb devices, run:

adb devices

Publishing a release

Due to 2FA requirements, releases must be published manually using the following script:

sh release.sh