Built with React Native and Expo
Note that most things are not installed using Homewbrew. Homebrew is nice for personal projects but doesn't scale well for teams.
Installation prerequisites:
-
nvm
(Node Version Manager) - install NOT usinghomebrew
:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Change the version in the command above to latest
nvm
version as needed. -
rvm
(Ruby Version Manager) - install NOT usinghomebrew
:\curl -sSL https://get.rvm.io | bash -s stable
-
node
v20.15.1 and select it - install usingnvm
:nvm install 20.15.1
nvm use 20.15.1
- installing should already switch to the desired version, but run this ifnode -v
shows a wrong version -
ruby
v3.2.2 and select it - install usingrvm
:rvm install 3.2.2
rvm use 3.2.2
- installing should already switch to the desired version, but run this ifruby -v
shows a wrong versionNote,
ruby
installation requires openSSL v1, if you have openSSL v3 installed, you might need to override with explicit reference to openSSL v1 directory if you installation fails on openSSL. e.g.rvm install 3.2.2 --with-openssl-dir=$(brew --prefix [email protected])
-
watchman
brew install watchman
-
This project uses the web5-js repo symlinked locally. You must clone the web5-js repo into a sibling folder next to this repo. Afterwards, install and build the web5-js repo.
Installation steps:
-
Run
corepack enable
to turn oncorepack
for this node version if you haven't already turned it on. -
Run
corepack install
to installyarn
pkg manager -
Run
yarn
to installnode_modules
Note, if you encounter the following error:
"Internal Error: Error when performing the request to https://registry.npmjs.org/yarn;
Check to see if you are running a VPN that blocks this URL, if so, disable the VPN and try again.
-
From root repo directory, run:
cd ios
thenbundle install
-
From root repo directory, run:
cd android
thebundle install
-
In the root repo directory run
yarn pods
to install CocoaPodsNote: if you encounter the error below:
[!] CocoaPods could not find compatible versions for pod "hermes-engine"
You will need to run the following command to update
hermes-engine
version inPodfile.lock
file in theios
directory as suggested in the full error message:pod update hermes-engine --no-repo-update
-
Install XCode with the latest SDK if necessary
-
Install Android Studio with the latest SDK if necessary
The project should now be ready to run.
First start the Metro Bundler:
yarn start
To Run iOS: Inside the ios
folder, open the .xcworkspace
and run the build (click the "play" button).
To Run Android: Open the android
folder in Android Studio and run the build.
The application can be debugged through VSCode
-
Download the Expo Tools VSCode Extension.
-
Use the "Run and Debug" menu in VSCode to run the script "Debug Expo App."
-
Fire up a simulator so that the session attaches to the debugger.
-
Set your breakpoints as needed.
Caution: Reused breakpoints don't work. Make sure to clear breakpoints in between sessions.
If you are having trouble getting the above method to work. Consider the alternative method below.
Start Metro Bundler with:
npx react-native start --experimental-debugger
Then you can launch the debugger by triggering the Dev Menu in the app (e.g. by pressing d
in the Metro Bundler terminal) then choosing the "Open Debugger" option, this will launch the debugger in the browser.
-
which yarn
should be/Users/{USER}/.yarn/bin/yarn
-
which rvm
should be/Users/{USER}/.rvm/bin/rvm
-
which node
should be/Users/{USER}/.nvm/versions/node/v20.15.1/bin/node
-
which npm
should be/Users/{USER}/.nvm/versions/node/v20.15.1/bin/npm
-
nvm list
should include-> v20.15.1
-
rvm list
should include=* ruby-3.2.2 [ arm64 ]
- Run
npx expo-env-info@latest
and send that info to a maintainer or post it in an issue