From 43bf2512902e77d2beb28a9f05841d5bba5082a9 Mon Sep 17 00:00:00 2001 From: Chris Nguyen Date: Thu, 30 Jun 2022 10:50:26 -0700 Subject: [PATCH 1/3] Update README with additional Android setup instructions --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1aca45d55..7ce14f5df 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,22 @@ Install dependencies with `yarn` >= 14.15.0 3. Build and deploy to simulator `yarn ios` or device `yarn ios:device` ### Android -1. `yarn start` to start dev server -2. Build and deploy to simulator or device `yarn android` +1. Install a JDK: + + 1.1 Install JDK 1.8.0_x (1.7 = Java 7, 1.8 = Java 8, etc.) where x is the latest update number (currently 1.8.0_333). You can try a newer JDK but some dependencies might not compile properly. + + 1.2 Add a `JAVA_HOME` environment variable to your `~/.profile` or `~/bash_profile` set to your JDK folder. *eg.* `JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8_0_333.jdk/Contents/Home` + +2. Google TapAndPay setup: + + 2.1 Google only makes this repository available if you have a TapAndPay dev account, we have one as a team so ask a team member to send you an ENCRYPTED email with a copy of the TapAndPay repository. + + 2.2 Create a `.m2/` directory somewhere (I put mine in the parent dir of the app root dir so I don't accidentally check it in) then copy the repository folder you received into the `.m2` folder so the path looks like `../.m2/repository/`. + + 2.3 From your home directory, open or create `~/.gradle/gradle.properties` and add `M2_REPOSITORY_URL=../../../.m2/repository` (or wherever you put yours, the path should be relative to `[app root]/android/app/build.gradle`). + +2. `yarn start` to start dev server +3. Build and deploy to simulator or device `yarn android` #### Accessing your local server To make requests to your local server, first take your local BitPay server cert and copy it into `android/app/src/main/res/raw` folder in either .pem or .der format. From 8e35533434faf4c0a30b218082eea014ac5643df Mon Sep 17 00:00:00 2001 From: Chris Nguyen Date: Thu, 30 Jun 2022 11:01:29 -0700 Subject: [PATCH 2/3] Update README with integration instructions --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7ce14f5df..b2f9c0b84 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,11 @@ This project uses `react-redux` https://react-redux.js.org/ for state management 1. In `src/contants/config.ts` change `APP_LOAD_STORY_BOOK=false` to `APP_LOAD_STORY_BOOK=true` 2. Run `yarn ` ex: `yarn ios`. Since we set `APP_LOAD_STORY_BOOK=true`, this runs Storybook instead of your actual app. +## Integrations +To test integrations such as Braze, Dosh, etc. you will need to get API keys from another team member. Then create `.env.production` and `.env.development` in the app root by copying the `.env.template` contents and populating the values appropriately. + +To switch to using dev or prod keys, run `yarn set:dev` or `yarn set:prod` respectively which will run replace scripts to populate these values into the appropriate build files, or run `yarn reset:dev` or `yarn reset:prod` to reset values. + ## Deeplinking Test deeplinking via command line with these commands (note: ampersand must be escaped for multiple params): From 4b4c701c06441d0587ee6d7a21dda9e804185669 Mon Sep 17 00:00:00 2001 From: Chris Nguyen Date: Thu, 30 Jun 2022 11:02:04 -0700 Subject: [PATCH 3/3] Fix README step numbers --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2f9c0b84..39af21b2e 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ Install dependencies with `yarn` >= 14.15.0 2.3 From your home directory, open or create `~/.gradle/gradle.properties` and add `M2_REPOSITORY_URL=../../../.m2/repository` (or wherever you put yours, the path should be relative to `[app root]/android/app/build.gradle`). -2. `yarn start` to start dev server -3. Build and deploy to simulator or device `yarn android` +3. `yarn start` to start dev server +4. Build and deploy to simulator or device `yarn android` #### Accessing your local server To make requests to your local server, first take your local BitPay server cert and copy it into `android/app/src/main/res/raw` folder in either .pem or .der format.