From 2fdab32f57580a0562394bb26e100dc9611ae29d Mon Sep 17 00:00:00 2001 From: Andrew Meyer Date: Fri, 19 Jan 2024 09:37:19 +0100 Subject: [PATCH] Prepare for public consumption * update the packed contents of the package * update relevant documentation --- contrib/debugging-react-native.md | 13 ++++++++----- packages/realm/README.md | 2 +- packages/realm/package.json | 8 +++++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/contrib/debugging-react-native.md b/contrib/debugging-react-native.md index a54c8d63049..e925ae78e59 100644 --- a/contrib/debugging-react-native.md +++ b/contrib/debugging-react-native.md @@ -14,9 +14,12 @@ In your realm-js project, run the following commands to prepare for debug mode: ``` # install js dependencies, but skip building the node binaries $ npm install --ignore-scripts +``` + +When running `pod install` for iOS, be sure to set the environment variable `BUILD_REALM_CORE=1`. This will flag core to be built from source with the Debug configuration. -# build the xcframework -$ ./scripts/build-ios.sh -c Debug -s +``` +BUILD_REALM_CORE=1 npx pod-install ``` You are now prepared to either use the [ReactTestApp](#setup-reacttestapp) or [prepare a custom project](#setup-custom-react-native-project) @@ -30,7 +33,7 @@ There is a test application in `tests/ReactTestApp` which will run all the unit $ cd tests $ npm install -# install the test app dependencies and copy realm and realm tests into node_modules using `install-local` +# install the test app dependencies and copy realm and realm tests into node_modules using `install-local` $ cd ReactTestApp $ npm install $ npx install-local @@ -41,8 +44,8 @@ $ open ios/ReactTestApp.xcworkspace ``` You should now be able to move onto -- [Debugging Javascript](#debugging-javascript) -- [Debugging C++](#debugging-c++) +- [Debugging Javascript](#debugging-javascript) +- [Debugging C++](#debugging-c++) ## Setup Custom React Native Project diff --git a/packages/realm/README.md b/packages/realm/README.md index 4edab2f88fc..0e4ff34982e 100644 --- a/packages/realm/README.md +++ b/packages/realm/README.md @@ -138,7 +138,7 @@ rm -rf ios/Pods rm ios/Podfile.lock rm -rf ~/Library/Developer/Xcode/DerivedData ``` -Afterwards, reinstall pods and try again. If this still doesn't work, ensure that `node_modules/realm/react-native/ios/realm-js-ios.xcframework` exists and contains a binary for your architecture. If this is missing, try reinstalling the `realm`` npm package. +Afterwards, reinstall pods and try again. If this still doesn't work, ensure that `node_modules/realm/react-native/ios/lib` directory exists and contains a libraries (`.a` files). If this is missing, try reinstalling the `realm` npm package and as well as cocoapods. #### Android This can occur when installing `realm` and not performing a clean build. The following commands can be used to clear your cache: diff --git a/packages/realm/package.json b/packages/realm/package.json index dc2251f209d..aeb8b0ef99b 100644 --- a/packages/realm/package.json +++ b/packages/realm/package.json @@ -54,11 +54,13 @@ "index.react-native.js", "types.d.cts", "react-native/android", - "react-native/ios/realm-js-ios.xcframework", - "react-native/ios/realm-js-ios.xcframework/**/*.a", "react-native/ios/RealmReact", - "bindgen/vendor/realm-core/dependencies.list", + "react-native/ios/output-files.xcfilelist", + "react-native/shared", + "binding", + "bindgen", "scripts/submit-analytics.mjs", + "scripts/generate-*.sh", "react-native.config.js", "RealmJS.podspec", "binding.gyp"