Install brew package manager.
NOTE: To successfully run the iOS e2e tests, it is essential to install the brew package manager.
Watchman is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
brew install watchmanMacOS ships with an old ruby version that is incompatible with this project
It is recommended to install a Ruby version manager such as rbenv
Install ruby version defined in the file .ruby-version
Troubleshooting
# Inspect that ruby is in path
which ruby
# Ensure you are using the correct ruby version
ruby --versionInstall bundler gem to manage and install gems such as Cocoapods. The bundle install command, which is run during yarn setup handles installing gem versions as specified in the project's GemFile
gem install bundler -v 2.5.8 && bundle install --gemfile=ios/GemfileThe easiest way to install Xcode is via the Mac App Store. Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app.
You will also need to install the Xcode Command Line Tools. Open Xcode, then choose Settings... (or Preferences...) from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
To install a simulator, open Xcode > Settings... (or Preferences...) and select the Platforms (or Components) tab. Select a simulator with the corresponding version of iOS you wish to use.
If you are using Xcode version 14.0 or greater than to install a simulator, open Xcode > Settings > Platforms tab, then click "+" icon and select iOS… option.
You might need to install applesimutils as well if is not installed by default with Xcode:
brew tap wix/brew
brew install applesimutilsIt is recommended to install a Node version manager such as nodenv, nvm, asdf
Install node version defined in the file .nvmrc
Ensure you are using the correct yarn version (yarn v4.10.3) as noted in the package.json.
Install Yarn v4 using corepack (recommended)
corepack enable
corepack prepare [email protected] --activate
# check yarn version (should show 4.10.3)
yarn --versionInstall Yarn v4 with NPM
npm install -g [email protected]
# check yarn version (should show 4.10.3)
yarn --versionUse project's bundled Yarn (no global install needed)
The project includes its own Yarn v4.10.3 binary at .yarn/releases/yarn-4.10.3.cjs. If you have any version of Yarn installed, the project will automatically use the correct version thanks to the .yarnrc.yml configuration.
# check yarn version (should show 4.10.3 when run from project directory)
yarn --versionInstall Android Studio
- Set environment variable
JAVA_HOME=/Applications/Android Studio.app/Contents/jbr/Contents/Hometo use the Java version shipped with Android Studio - Go to Settings > Languages & Frameworks > Android SDK
- Shortcut: Selecting
More Actions>SDK Managerfrom the "Welcome to Android Studio" page will also bring you here.- Select
SDK Toolstab - Check
Show Package Detailsoption below the tools list to show available versions - Locate
NDK (Side-by-side)option in the tools list - Check NDK version
26.1.10909125 - Locate
CMakeoption in the tools list - Check CMake version
3.22.1 - Click "Apply" or "OK" to download
- Select
- Finally, start the emulator from Android Studio:
- Open "Virtual Device Manager"
- Launch emulator for "Pixel 5 <relevant API version mentioned in React Native Getting Started>"
WIP
You are ready to setup metamask-mobile project in your system!