mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update build.md (#1785)

authored by

Spandan Tripathy and committed by
GitHub
d7744c25 29bfed78

+14 -14
+14 -14
docs/build.md
··· 2 2 3 3 ## App Build 4 4 5 - - Setup your environment [using the react native instructions](https://reactnative.dev/docs/environment-setup). 5 + - Set up your environment [using the react native instructions](https://reactnative.dev/docs/environment-setup). 6 6 - Setup your environment [for e2e testing using detox](https://wix.github.io/Detox/docs/introduction/getting-started): 7 7 - yarn global add detox-cli 8 8 - brew tap wix/brew ··· 20 20 - iOS: `yarn ios` 21 21 - Android: `yarn android` 22 22 - Web: `yarn web` 23 - - If you are cloning or forking this repo as an open source developer, please check the tips below as well 23 + - If you are cloning or forking this repo as an open-source developer, please check the tips below as well 24 24 - Run e2e tests 25 25 - Start in various console tabs: 26 26 - `yarn e2e:mock-server` ··· 28 28 - Run once: `yarn e2e:build` 29 29 - Each test run: `yarn e2e:run` 30 30 - Tips 31 - - Make sure to copy the `.env.example` to `.env` and fill in any necessary tokens. (The Sentry token is NOT required; see instructions below if you want to enable Sentry.) 32 - - To run on device, add `--device` to the command (e.g. `yarn android --device`). To build in production mode (slower build, faster app), also add `--variant release`. 33 - - If you want to use Expo EAS on your own builds without ejecting from Expo, make sure to change the `owner` as well as `extra.eas.projectId` properties. If you do not have an Expo account, you may remove these properties. 31 + - Copy the `.env.example` to `.env` and fill in any necessary tokens. (The Sentry token is NOT required; see instructions below if you want to enable Sentry.) 32 + - To run on the device, add `--device` to the command (e.g. `yarn android --device`). To build in production mode (slower build, faster app), also add `--variant release`. 33 + - If you want to use Expo EAS on your own builds without ejecting from Expo, make sure to change the `owner` and `extra.eas.projectId` properties. If you do not have an Expo account, you may remove these properties. 34 34 - `npx react-native info` Checks what has been installed. 35 - - If the android simulator frequently hangs or is very sluggish, [bump its memory limit](https://stackoverflow.com/a/40068396) 36 - - The android simulator won't be able to access localhost services unless you run `adb reverse tcp:{PORT} tcp:{PORT}` 35 + - If the Android simulator frequently hangs or is very sluggish, [bump its memory limit](https://stackoverflow.com/a/40068396) 36 + - The Android simulator won't be able to access localhost services unless you run `adb reverse tcp:{PORT} tcp:{PORT}` 37 37 - For instance, the locally-hosted dev-wallet will need `adb reverse tcp:3001 tcp:3001` 38 - - For some reason, the typescript compiler chokes on platform-specific files (e.g. `foo.native.ts`) but only when compiling for Web thus far. Therefore we always have one version of the file which doesn't use a platform specifier, and that should be the Web version. ([More info](https://stackoverflow.com/questions/44001050/platform-specific-import-component-in-react-native-with-typescript).) 38 + - For some reason, the typescript compiler chokes on platform-specific files (e.g. `foo.native.ts`) but only when compiling for Web thus far. Therefore we always have one version of the file that doesn't use a platform specifier, and that should be the Web version. ([More info](https://stackoverflow.com/questions/44001050/platform-specific-import-component-in-react-native-with-typescript).) 39 39 40 40 ### Adding Sentry 41 41 ··· 81 81 - Android Device: Shake the device vertically, or if your device is connected via USB, run adb shell input keyevent 82 in your terminal 82 82 - Android Emulator: Either press Cmd ⌘ + m or Ctrl + m or run adb shell input keyevent 82 in your terminal 83 83 - iOS Device: Shake the device, or touch 3 fingers to the screen 84 - - iOS Simulator: Press Ctrl + Cmd ⌘ + z on a Mac in the emulator to simulate the shake gesture, or press Cmd ⌘ + d 84 + - iOS Simulator: Press Ctrl + Cmd ⌘ + z on a Mac in the emulator to simulate the shake gesture or press Cmd ⌘ + d 85 85 86 86 ### Running E2E Tests 87 87 88 - - Make sure you've setup your environment following above 88 + - Make sure you've set your environment following the above 89 89 - Make sure Metro and the dev server are running 90 90 - Run `yarn e2e` 91 91 - Find the artifacts in the `artifact` folder 92 92 93 93 ### Polyfills 94 94 95 - `./platform/polyfills.*.ts` adds polyfills to the environment. Currently this includes: 95 + `./platform/polyfills.*.ts` adds polyfills to the environment. Currently, this includes: 96 96 97 97 - TextEncoder / TextDecoder 98 98 99 99 ### Sentry sourcemaps 100 100 101 - Sourcemaps should automatically be updated when a signed build is created using `eas build` and published using `eas submit` due to the postPublish hook setup in `app.json`. However, if an update is created and published OTA using `eas update`, we need to the take the following steps to upload sourcemaps to Sentry: 101 + Sourcemaps should automatically be updated when a signed build is created using `eas build` and published using `eas submit` due to the postPublish hook setup in `app.json`. However, if an update is created and published OTA using `eas update`, we need to take the following steps to upload sourcemaps to Sentry: 102 102 103 103 - Run eas update. This will generate a dist folder in your project root, which contains your JavaScript bundles and source maps. This command will also output the 'Android update ID' and 'iOS update ID' that we'll need in the next step. 104 104 - Copy or rename the bundle names in the `dist/bundles` folder to match `index.android.bundle` (Android) or `main.jsbundle` (iOS). ··· 122 122 123 123 ### OTA updates 124 124 125 - To create OTA updates, run `eas update` along with the `--branch` flag to indicate which branch you want to push the update to, and the `--message` flag to indicate a message for yourself and your team that shows up on https://expo.dev. ALl the channels (which make up the options for the `--branch` flag) are given in `eas.json`. [See more here](https://docs.expo.dev/eas-update/getting-started/) 125 + To create OTA updates, run `eas update` along with the `--branch` flag to indicate which branch you want to push the update to, and the `--message` flag to indicate a message for yourself and your team that shows up on https://expo.dev. All the channels (which make up the options for the `--branch` flag) are given in `eas.json`. [See more here](https://docs.expo.dev/eas-update/getting-started/) 126 126 127 - The clients which can receive an OTA update is governed by the `runtimeVersion` property in `app.json`. Right now, it is set so that only apps with the same `appVersion` (same as `version` property in `app.json`) can receive the update and install it. However, we can manually set `"runtimeVersion": "1.34.0"` or anything along those lines as well. This is useful if very little native code changes from update-to-update. If we are manually setting `runtimeVersion`, we should increment the version each time native code is changed. [See more here](https://docs.expo.dev/eas-update/runtime-versions/) 127 + The clients which can receive an OTA update are governed by the `runtimeVersion` property in `app.json`. Right now, it is set so that only apps with the same `appVersion` (same as `version` property in `app.json`) can receive the update and install it. However, we can manually set `"runtimeVersion": "1.34.0"` or anything along those lines as well. This is useful if very little native code changes from update to update. If we are manually setting `runtimeVersion`, we should increment the version each time the native code is changed. [See more here](https://docs.expo.dev/eas-update/runtime-versions/)