|
1 | 1 | # Building Bitkit from source |
2 | 2 |
|
| 3 | +These instructions are for building Bitkit from source to get a production version of the app. If you are looking for the latest release, you can download it from the [App Store](https://testflight.apple.com/join/lGXhnwcC) or [Google Play](https://play.google.com/store/apps/details?id=to.synonym.bitkit.wallet) or get the latest APK from the [releases page](https://github.com/synonymdev/bitkit/releases). |
| 4 | + |
| 5 | +## Requirements |
| 6 | + |
| 7 | +Make sure you have [setup your environment for React Native](https://reactnative.dev/docs/environment-setup). |
| 8 | + |
| 9 | +> [!NOTE] |
| 10 | +> Not all of the steps outlined in the above link may be required for building the app. You can skip the ones not relevant to you. |
| 11 | +
|
3 | 12 | ## Setup |
4 | 13 |
|
5 | 14 | 1. Clone the repository |
|
10 | 19 |
|
11 | 20 | 2. Switch Node version |
12 | 21 |
|
13 | | -Switch to the Node.js version defined in `.nvmrc`. If `nvm` (or similar) is installed on your system you can run `nvm use`. |
| 22 | +Switch to the Node.js version defined in `.node-version`. You can visit [.node-version File Usage](https://github.com/shadowspawn/node-version-usage) and use one of these methods to change the node version you need. |
14 | 23 |
|
15 | 24 | 3. Install dependencies |
16 | 25 |
|
17 | 26 | ```shell |
18 | 27 | yarn install |
19 | 28 | ``` |
20 | 29 |
|
| 30 | +4. Set environment variables |
| 31 | + |
| 32 | +```shell |
| 33 | +cp .env.production.template .env.production |
| 34 | +``` |
| 35 | + |
21 | 36 | ## Build |
22 | 37 |
|
23 | 38 | ### iOS |
24 | 39 |
|
25 | | -For iOS: Open the `ios` folder in Xcode to build the project. |
| 40 | +Follow instructions from the [React Native docs](https://reactnative.dev/docs/publishing-to-app-store) for iOS. |
26 | 41 |
|
27 | 42 | ### Android |
28 | 43 |
|
29 | | -For Android: `yarn bundle`. |
30 | | - |
31 | | -Moreover, to build the Android APK, it is necessary to configure a signing store to sign |
32 | | -the apk, as explained by [React Docs](https://reactnative.dev/docs/signed-apk-android). |
33 | | - |
34 | | -It is recommend to use the already presented `debug.store` in `android/app`. |
35 | | -Add the following lines to `~/.gradle/gradle.properties`: |
36 | | - |
37 | | -```shell |
38 | | -BITKIT_UPLOAD_STORE_FILE=debug.keystore |
39 | | -BITKIT_UPLOAD_STORE_PASSWORD=android |
40 | | -BITKIT_UPLOAD_KEY_ALIAS=androiddebugkey |
41 | | -BITKIT_UPLOAD_KEY_PASSWORD=android |
42 | | -``` |
| 44 | +Follow instructions from the [React Native docs](https://reactnative.dev/docs/signed-apk-android) for Android. After that you can find the `.aab` under `android/app/build/outputs/bundle/release/app-release.aab` which can be installed on your device. |
0 commit comments