Skip to content

Commit

Permalink
Prepare for public consumption
Browse files Browse the repository at this point in the history
* update the packed contents of the package
* update relevant documentation
  • Loading branch information
takameyer committed Jan 24, 2024
1 parent 17e0dfa commit 2fdab32
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
13 changes: 8 additions & 5 deletions contrib/debugging-react-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/realm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions packages/realm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2fdab32

Please sign in to comment.