Follow these steps to quickly set up your development environment, hassle-free.
This section is written specifically for Mac environment. Separate instructions related to Windows and Android will be added here soon.
Prerequisites
To make sure things work out smoothly for you, make sure you have:
| Product | Minimum version |
|---|---|
| Node | 12 |
| Yarn | 1.20.0 |
| MacOS | 11.3 |
| Xcode | 13 |
| Cocoapods | 1.11.2 |
Set Up
On systems with Homebrew package manager, the “Using Package Managers” method is recommended. On other systems, “Basic Git Checkout” might be the easiest way of ensuring that you are always installing the latest version of these dependencies.
-
The first task is to start by configuring an ssh key which can be done by following the instructions in BitBucket:
-
Follow these instructions if you have not yet created a Google Account with Bildit's email: Configuring Google Account
-
Afterwards, create a Firebase account if you don't have one already.
Make sure to use the newly configured Google Account with Bildit's email (ex: [email protected])
-
Then, create an NPM account.
Remember to use the email given to you by Bildit.
Follow up by making sure that you have been added to the NPM organization for Bildit.
-
Then, follow the NPM token creation procedure 🪙 To prevent future errors, provide read-only access to your NPM Token.
Mac Set Up
1. Start by installing homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Then, add it to your path
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
3. Verify that no duplicate commands have been added to ~/.bash_profile
cat ~/.bash_profile
4. Go into ~/.bash_profile if there are duplicates
vi ~/.bash_profile
5. Go to the line that has a repeated command, remove it, and exit out of ~/.bash_profile
dd
:wq
6. Then download node
brew update
brew install node
7. Then verify download
node -v
npm -v
The output should be
Node.js v20.2.0 or higher
[email protected] or higher
8. Some of the applications require different versions of node. In order to switch rapidly between different versions, download nvm
brew install nvm
9. Add nvm to your bash path
source ~/.nvm/nvm.sh
# do this or add it to your zshrc or bash_profile.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
10. Install Yarn
npm install --global yarn
11. Install ruby
brew update
brew install ruby
12. To change between version of ruby download rbenv
brew install rbenv ruby-build
rbenv init
Add it to path
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bash_profile
Basic rbenv commands
# list latest stable versions:
rbenv install -l
# list all local versions:
rbenv install -L
# install a Ruby version:
rbenv install 3.1.2
rbenv global 3.1.2 # set the default Ruby version for this machine
# or:
rbenv local 3.1.2 # set the Ruby version for this directory
13. Install firebase
curl -sL https://firebase.tools | bash
14. Install watchman
brew install watchman
15. Install Husky
npm install husky --save-dev
Windows Set Up
Begin by downloading NVM follow the link in order to use NVM on native windows then downlad nodes and npm through the nvm modules.
1. Install Yarn
npm install --global yarn
Install ruby by following the prompt for windows.
2. To change between versions of ruby, download rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
3. Add it to path
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bash_profile
4. Basic rbenv commands
# list latest stable versions:
rbenv install -l
# list all local versions:
rbenv install -L
# install a Ruby version:
rbenv install 3.1.2
rbenv global 3.1.2 # set the default Ruby version for this machine
# or:
rbenv local 3.1.2 # set the Ruby version for this directory
If the rbenv commands do not work, follow this link to install and use rbenv with WSL2
5. Install firebase
curl -sL https://firebase.tools | bash
6. Install Husky
npm install husky --save-dev
Linux Set Up
1. Start by installing homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Then, add it to your path
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
3. Then download node on Ubuntu, Debian, and Linux Mint
sudo apt install nodejs npm
4. Download on CentOS 8 (and newer), Fedora, and Red Hat
sudo dnf install nodejs # also installs npm
5. Then verify download
node -v
npm -v
6. Some of the applications require different versions of node. In order to switch rapidly between different versions, download nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
7. Add nvm to your bash path
source ~/.nvm/nvm.sh
8. Install Yarn
npm install --global yarn
9. Install ruby
sudo apt update
sudo apt install ruby-full
10. To change between versions of ruby, downlaod rbenv
sudo apt install rbenv
rbenv init
11. Add it to path
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
12. Basic rbenv commands
# list latest stable versions:
rbenv install -l
# list all local versions:
rbenv install -L
# install a Ruby version:
rbenv install 3.1.2
rbenv global 3.1.2 # set the default Ruby version for this machine
# or:
rbenv local 3.1.2 # set the Ruby version for this directory
13. Install firebase
curl -sL https://firebase.tools | bash
14. Install watchman
brew install watchman
15. Install Husky
npm install husky --save-dev
Final Steps
Make sure to verify all of the dependencies are downloaded
Then follow the React-Native CLI Quickstart for your respective operating system.
Navigate to the BILDIT App Repository , and hit the clone button and choose the option of your choice to clone the code.
If you can not see the clone option, it is likely you do not have access to the repository. In such case, request Matt, to provide you access to the repository.
Once you have successfully cloned the repository, open the terminal at the repository and change your branch to the develop branch.
git checkout developgit pull origin
Provide Access to Private Packages
Run the following command in terminal
echo '\nexport BILDIT_NPM_TOKEN="YOUR_NPM_TOKEN_HERE"' >> ~/.zshrc
Now, close the terminal, and re-open the terminal at your repository.
Install Packages and Pods
Now you can run the following commands to install the dependencies.
yarn installcd iospod install
Build and Run the App
Once all the dependencies you can head to Xcode and open the workspace located in the ios folder. Hit the build button, and the app should start building right away!
BILDIT START UP
These are the dependencies and necessary requisites needed in order to run the Visual Experience Engine and APP. Follow the drop down to set up based on the operating system and follow along downloading dependencies that you may not have.