diff --git a/contrib/building.md b/contrib/building.md index ddf183403eb..ff5de679ccf 100644 --- a/contrib/building.md +++ b/contrib/building.md @@ -22,8 +22,8 @@ - [Building for Node.js](#building-for-nodejs) - [Additional steps for Windows](#additional-steps-for-windows) - [Building for ARM/Linux](#building-for-armlinux) - - [Building the documentation](#building-the-documentation) - [Cleaning up build files](#cleaning-up-build-files) + - [Building the documentation](#building-the-documentation) - [Running the tests](#running-the-tests) - [Linting the source code](#linting-the-source-code) - [JS/TS](#jsts) @@ -212,15 +212,22 @@ Other editors should also be able to be configured to use the `compile_commands. You can build and bundle for iOS by running the following command from the root directory: ```sh -npm run build:ios --workspace realm +npm run bindgen:generate:jsi --workspace realm npm run bundle --workspace realm ``` +In the consuming project, be sure to enable building core from source by setting the environment variable `BUILD_REALM_CORE`. +This can either be set globally or locally before running `pod install`: +``` +BUILD_REALM_CORE=1 pod install +``` + ### Building for Android You can build and bundle for Android by running the following command from the root directory: ```sh +npm run bindgen:generate:jsi --workspace realm npm run build:android --workspace realm npm run bundle --workspace realm ``` diff --git a/integration-tests/environments/react-native/README.md b/integration-tests/environments/react-native/README.md index ef8bad66448..33773cea051 100644 --- a/integration-tests/environments/react-native/README.md +++ b/integration-tests/environments/react-native/README.md @@ -18,14 +18,20 @@ To install this environment, run the following command from the root directory o npx lerna bootstrap --scope @realm/react-native-tests --include-dependencies ``` -For iOS environments run +For iOS environments run ```bash -npx pod-install +npx pod-install ``` within the `integration-tests/environments/react-native` directory. +To build iOS with debug symbols, run `pod install` with the environment variable `BUILD_REALM_CORE`. + +```bash +BUILD_REALM_CORE=1 npx pod-install +``` + ## Running the tests To run tests on Android, start an emulator and run: @@ -216,5 +222,5 @@ Open the `package.json` of both `react-native` and `react-native-backup`: Install dependencies again to run the `prepare` script (from the root of the repository): ```bash -npx lerna bootstrap +npm install ```